junyanz / CycleGAN

Software that can generate photos from paintings, turn horses into zebras, perform style transfer, and more.
Other
12.23k stars 1.93k forks source link

th: command not found #82

Closed gitrobin closed 6 years ago

gitrobin commented 6 years ago

WHen I run DATA_ROOT=./datasets/horse2zebra name=horse2zebra_model th train.lua in the terminal, it always remind me of "th: command not found"

taesungp commented 6 years ago

You need to install Lua Torch to run CycleGAN.

Please refer to this webpage.

http://torch.ch/docs/getting-started.html#_

denka0711 commented 5 years ago

@taesung89 why Lua Torch, what's difference between Lua Torch and pytorch

taesungp commented 5 years ago

The deep learning framework, called Torch, was based on a programming language named Lua. This repository hosts the code for CycleGAN that was built on Torch.

After the release of CycleGAN, people developed a new framework called PyTorch, which follows the style of Torch but runs using Python. Now that PyTorch became very popular, I called the original Torch Lua Torch to avoid confusion.

So what I just meant was "You need to install Torch to run CycleGAN".

denka0711 commented 5 years ago

hi @taesung89 thanks for your kind response, ! I am new one to Gan and pytorch. I am implementing your code, could you tell me which version just use the pytorch to implement your work (Object Transfiguration)

tianke0711 commented 5 years ago

Hi me to

tianke0711 commented 5 years ago

hi @taesung89 https://github.com/junyanz/pytorch-CycleGAN-and-pix2pix is this version just use the pytorch?

taesungp commented 5 years ago

Yes, that link is correct. You should be able to run it using the current pytorch version. The installation instruction should be on that page. If you have problem running it, please look at the instruction and also issue on that git repo. Thanks!!

tianke0711 commented 5 years ago

@taesung89 thanks

AlexRMU commented 4 years ago

Hard but easy

Clone the Torch repo (forked to work with CUDA 10).

!git clone https://github.com/nagadomi/distro.git torch --recursive

Install Torch.

import os
os.chdir('./torch/')
!bash install-deps
!./install.sh

Activate Torch.

!. ./install/bin/torch-activate

Make sure the installation worked.

!./install/bin/th

Result:

  ______             __   |  Torch7 
 /_  __/__  ________/ /   |  Scientific computing for Lua. 
  / / / _ \/ __/ __/ _ \  |  Type ? for help 
 /_/  \___/_/  \__/_//_/  |  https://github.com/torch 
                          |  http://torch.ch 

th> ^C