neural-style install
1. torch 설치 :
# in a terminal, run the commands
cd ~/
git clone https://github.com/torch/distro.git ~/torch --recursive
sudo apt-get install libreadline-dev libjpeg-dev cmake git
cd ~/torch; ./install.sh
2. loadcaffe 설치 :
좀 복잡한 부분이라 저도 정확이 이해는 못하고 있지만, neural-style은 caffe에서 학습시킨 VGG_ILSVRC_19_layers란 네트워크 모델을 가져다 쓴답니다. 이걸 쓰기 위해서는 우선
sudo apt-get install libprotobuf-dev protobuf-compiler
명령으로 구글의 '프로토콜 버퍼' 라이브러리를 깔아주고,
luarocks install loadcaffe
3. neural-style 설치 :
설치할 폴더에서,
설치라기 보다 카피이지요.
cd neural-style
sh models/download_models.sh
해 주시면 실제로 쓸 caffemodel파일을 다운로드 해 옵니다.
모델파일이 다운로드 됐으면 이제 토치를 써 볼 수 있지요.
---------------------------------------------------------------------------------
---------------------------------------------------------------------------------
5. run
토치를 실행시키는 명령인 'th'로 뉴럴스타일 'neural-style.lua'를 돌려봅니다.
th neural_style.lua -gpu -1 -print_iter -1
제대로 다 설치가 됐으면 :
Successfully loaded models/VGG_ILSVRC_19_layers.caffemodel
conv1_1: 64 3 3 3
conv1_2: 64 64 3 3
...
...
이렇게 나와야 하구요.
실제로 내 그림을 가지고, 아무 옵션없이 디폴트로 돌려 보려면 :
th neural_style.lua -style_image <image.jpg> -content_image <image.jpg>
1. torch 설치 :
답글삭제# in a terminal, run the commands
cd ~/
curl -s https://raw.githubusercontent.com/torch/ezinstall/master/install-deps | bash
git clone https://github.com/torch/distro.git ~/torch --recursive
[ sudo apt-get install libreadline-dev libjpeg-dev cmake git ]
cd ~/torch; ./install.sh
telnet towel.blinkenlights.nl
답글삭제스타워즈 1편을 터미널로 보기
apt-get install sl
답글삭제sl
기차 지나가기
apt-get install fortune
답글삭제fortune
명사들의 명언, 오늘의 운세
root@tecmint:~# rev
답글삭제123abc
cba321
xuniL eb ot nrob
born to be Linux
factor 1101
답글삭제1101: 3 367
소인수 분해
터미널에서 클립보드로
답글삭제$ cat ~/Desktop/ded.html | pbcopy
Now that file is in the clipboard.
To put it somewhere else, that is, to paste it, do:
$ pbpaste > ~/Documents/ded.html
이전에 작업하던 디렉토리로 이동하기
답글삭제$ cd -
or
$ cd $OLD_PWD
파일 크기로 찾기: 보다 큰거 모두 찾기
답글삭제$ find ~/ -size +1024k
하드웨어 목록 표시
답글삭제$ sudo lshw
USB 목록표시
답글삭제$ sudo lsusb
스토리지 목록 보여주기
답글삭제$ sudo fdisk -l