akanimax / BMSG-GAN

[MSG-GAN] Any body can GAN! Highly stable and robust architecture. Requires little to no hyperparameter tuning. Pytorch Implementation
MIT License
630 stars 104 forks source link

Can't load images | KeyError: 'SM_CHANNEL_TRAINING' #42

Closed xSplasher closed 3 years ago

xSplasher commented 3 years ago

i ran !python train.py --depth=7 --latent_size=512 --images_dir='../data/train' --num_epochs=100 --num_samples=8 --sample_dir=samples/exp_1 --model_dir=models/exp_1 and got this error:

Traceback (most recent call last):
  File "train.py", line 267, in <module>
    main(parse_arguments())
  File "train.py", line 57, in parse_arguments
    default=os.environ['SM_CHANNEL_TRAINING'],
  File "/usr/lib/python3.6/os.py", line 669, in __getitem__
    raise KeyError(key) from None
KeyError: 'SM_CHANNEL_TRAINING'

i'm using google colab on pytorch 1.7 version dataset im using is "Linnaeus 5 256X256" from here data folder has 2 folders inside: train and test. inside them folders containing jpg images

what i tried and didnt work: used a different path pytorch 1.0.0 version on my local machine removing some & all parameters using a different dataset

i hope somebody help me, i spent hours trying to find a solution and didn't succeed.

Thank you.

victor-navarro commented 3 years ago

I got the same error. From what I could find, that error is related to SageMaker, so you might want to look into that. For my application, I could instead use @akanimax 's pytorch implementation (msg-gan-v1). That one is running without any issues.

xSplasher commented 3 years ago

that did the job, Thank you @victor-navarro