Closed ArchitectTaeyoon closed 6 years ago
Two possible reasons: (1) Maybe you haven't placed the dataset in the path ./datasets/maps/trainA
. (2) I haven't used Windows for a long time. Maybe you want to replace the /
by \
in the path.
Thank you ! After sorting out the file directory like you mentioned, it moved on :)
The training process started, but then I ran into 4 exceptions and 1 connection error -
ConnectionRefusedError: [WinError 10061] No connection could be made because the target machine actively refused it
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x000001B7122DDDD8>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=8097): Max retries exceeded with url: /env/main (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x000001B7122DDDD8>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it',))
File "C:\Users\tyk12\Anaconda3\lib\site-packages\requests\adapters.py", line 508, in send raise ConnectionError(e, request=request) requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8097): Max retries exceeded with url: /env/main (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x000001B7122DDDD8>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it',))
ConnectionError: Error connecting to Visdom server
When I trigger visdom
command, the Visdom browser window pops up fine.
I am going through Q&A, and google-searching to solve the issues one by one :)
Oooooh... I never thought about having 2 anaconda prompt windows open! one for Visdom and one for training... Sorry and thanks!
Now I ran into a new error;
ValueError: empty range for randrange() (0,0, 0)
I am referring to issue #194
I tried adding --loadSize 143 --fineSize 128
and I still get the same error;
index_B = random.randint(0, self.B_size - 1)
File "C:\Users\tyk12\Anaconda3\lib\random.py", line 221, in randint
return self.randrange(a, b+1)
File "C:\Users\tyk12\Anaconda3\lib\random.py", line 199, in randrange
raise ValueError("empty range for randrange() (%d,%d, %d)" % (istart, istop, width))
ValueError: empty range for randrange() (0,0, 0)
Thank you for helping me along the way :) I got to learn a lot. I think I am almost there..!
I don't know the solution. The command python train.py --dataroot ./datasets/maps --name maps_cyclegan --model cycle_gan
works for me on my Linux. The code has not been tested on Windows.
Okay thanks for looking into it 👍
Maybe I should try docker.
Got this to run in Windows properly now!
I changed the directories in image_folder.py, and downgraded the version of visdom.
Thanks again ! :)
Got this to run in Windows properly now!
I changed the directories in image_folder.py, and downgraded the version of visdom.
Thanks again ! :)
How do you change the directories in image_folder.py! Can you kindly explain with code? Also could you kindly guide me how to downgrade the visdom's version using pip!
AssertionError: ./datasets/dehazing\train is not a valid directory
Can you kindly help me to fix this error!
I think Windows has a different path format compared to Linux. Try something like .\datasets\dehazing\train
.
AssertionError: ./datasets/dehazing\train is not a valid directory
Can you kindly help me to fix this error!
I have the same question, have you ever solved this problem? can you kindly help me to fix this error? thank you!
I have manually downloaded the maps dataset, and ran the train command in Anaconda3 prompt (Windows 10 64bit). I get the following error -
Traceback (most recent call last): File "train.py", line 9, in <module> data_loader = CreateDataLoader(opt) File "C:\Users\tyk12\Documents\2_CODE\pix2pix\pytorch-CycleGAN-and-pix2pix\data\__init__.py", line 46, in CreateDataLoader data_loader.initialize(opt) File "C:\Users\tyk12\Documents\2_CODE\pix2pix\pytorch-CycleGAN-and-pix2pix\data\__init__.py", line 58, in initialize self.dataset = create_dataset(opt) File "C:\Users\tyk12\Documents\2_CODE\pix2pix\pytorch-CycleGAN-and-pix2pix\data\__init__.py", line 39, in create_dataset instance.initialize(opt) File "C:\Users\tyk12\Documents\2_CODE\pix2pix\pytorch-CycleGAN-and-pix2pix\data\unaligned_dataset.py", line 19, in initialize self.A_paths = make_dataset(self.dir_A) File "C:\Users\tyk12\Documents\2_CODE\pix2pix\pytorch-CycleGAN-and-pix2pix\data\image_folder.py", line 26, in make_dataset assert os.path.isdir(dir), '%s is not a valid directory' % dir AssertionError: ./datasets/maps/trainA is not a valid directory
Thank you in advance!