如何从googlecolab运行luaml模型
我试图在Github上运行这个模型,但是在GoogleColab上,因为我的计算机没有足够的内存/CPU/任何东西 我已经将我的谷歌硬盘安装到我的笔记本上,通过以下方式将repo克隆到我的硬盘上,并将模型下载到我的硬盘文件夹中,为了测试它是否有效,我使用自述文件中运行Brad Pitt示例的最基本示例,使用:如何从googlecolab运行luaml模型,lua,pytorch,google-colaboratory,Lua,Pytorch,Google Colaboratory,我试图在Github上运行这个模型,但是在GoogleColab上,因为我的计算机没有足够的内存/CPU/任何东西 我已经将我的谷歌硬盘安装到我的笔记本上,通过以下方式将repo克隆到我的硬盘上,并将模型下载到我的硬盘文件夹中,为了测试它是否有效,我使用自述文件中运行Brad Pitt示例的最基本示例,使用: th neural_style.lua -style_image examples/inputs/picasso_selfport1907.jpg -content_image examp
th neural_style.lua -style_image examples/inputs/picasso_selfport1907.jpg -content_image examples/inputs/brad_pitt.jpg
但由于某种原因,它不会起作用
subprocess.run()
刚返回没有这样的文件或目录
!th neural_style.lua…
返回th:command not found
# Mount the drive
from google.colab import drive
drive.mount('/content/drive')
# Clone the repo onto the drive
!git clone https://github.com/jcjohnson/neural-style
# Install Pytorch
!pip3 install http://download.pytorch.org/whl/cu80/torch-0.3.0.post4-cp36-cp36m-linux_x86_64.whl
!pip3 install torchvision
# Download the models per the github repo instructions
!bash models/download_models.sh
!th neural_style.lua -style_image examples/inputs/picasso_selfport1907.jpg -content_image examples/inputs/brad_pitt.jpg
第一:
现在,它应该使用到th
的绝对路径工作:
!/content/torch/install/bin/th neural_style.lua -style_image examples/inputs/picasso_selfport1907.jpg -content_image examples/inputs/brad_pitt.jpg
!/content/torch/install/bin/th neural_style.lua -style_image examples/inputs/picasso_selfport1907.jpg -content_image examples/inputs/brad_pitt.jpg