hiarsal/DAE-GAN

File "DAE-GAN/code/main.py", line 269, in sampling assert dataset AssertionError

LeNguyenMinhTuan opened this issue · 2 comments

Traceback (most recent call last):
  File "DAE-GAN/code/main.py", line 448, in <module>
    main()
  File "DAE-GAN/code/main.py", line 444, in main
    sampling(0, args)
  File "DAE-GAN/code/main.py", line 269, in sampling
    assert dataset
AssertionError

Command I run:
!python DAE-GAN/code/main.py --cfg DAE-GAN/code/cfg/eval_bird.yml --gpu 1

Using config:
{'B_VALIDATION': True,
 'CONFIG_NAME': 'DAE-GAN',
 'CUDA': True,
 'DATASET_NAME': 'birds',
 'DATA_DIR': '/content/drive/MyDrive/DAE-GAN/data/birds',
 'GAN': {'B_ATTENTION': True,
         'B_DCGAN': False,
         'CONDITION_DIM': 100,
         'DF_DIM': 32,
         'GF_DIM': 64,
         'R_NUM': 2,
         'Z_DIM': 100},
 'GPU_ID': 1,
 'MAX_ATTR_LEN': 5,
 'MAX_ATTR_NUM': 3,
 'RNN_TYPE': 'LSTM',
 'TEXT': {'CAPTIONS_PER_IMAGE': 10, 'EMBEDDING_DIM': 256, 'WORDS_NUM': 20},
 'TRAIN': {'BATCH_SIZE': 10,
           'B_NET_D': False,
           'DISCRIMINATOR_LR': 0.0002,
           'ENCODER_LR': 0.0002,
           'FLAG': False,
           'GENERATOR_LR': 0.0002,
           'MAX_EPOCH': 120,
           'NET_E': '/content/drive/MyDrive/DAE-GAN/DAMSMencoders/bird/text_encoder200.pth',
           'NET_G': '/content/drive/MyDrive/DAE-GAN/model/netG_1.pth',
           'RNN_GRAD_CLIP': 0.25,
           'SMOOTH': {'GAMMA1': 4.0,
                      'GAMMA2': 5.0,
                      'GAMMA3': 10.0,
                      'LAMBDA': 50.0},
           'SNAPSHOT_INTERVAL': 5},
 'TREE': {'BASE_SIZE': 64, 'BRANCH_NUM': 4},
 'WORKERS': 1}
Seed: 100
/usr/local/lib/python3.7/dist-packages/torchvision/transforms/transforms.py:317: UserWarning: The use of the transforms.Scale transform is deprecated, please use transforms.Resize instead.
  warnings.warn("The use of the transforms.Scale transform is deprecated, " +
/content/drive/MyDrive/DAE-GAN/data/birds
Total filenames:  11788 001.Black_footed_Albatross/Black_Footed_Albatross_0046_18.jpg
filepath: /content/drive/MyDrive/DAE-GAN/data/birds/captions.pickle
Load from:  /content/drive/MyDrive/DAE-GAN/data/birds/captions.pickle
dataset 1
Traceback (most recent call last):
  File "DAE-GAN/code/main.py", line 448, in <module>
    main()
  File "DAE-GAN/code/main.py", line 444, in main
    sampling(0, args)
  File "DAE-GAN/code/main.py", line 269, in sampling
    assert dataset
AssertionError

Enviroment:
Run on colab
Python version: Python 3.7.12

Please help me fix this bug. Thank you!!!!!!!

Please did you find a solution for this problem ?

Besides downloading CUB_200_2011 dataset from thr oppicial web, preprocessed metadata from AttnGAN is needed