cxm12 / TGSR

Rethinking Super-Resolution as Text-Guided Details Generation
3 stars 0 forks source link

AttributeError: 'NoneType' object has no attribute 'TEXT' #1

Open wgfrhebnr opened 10 months ago

wgfrhebnr commented 10 months ago

(tgsr37) chenz@chenz-System-Product-Name:/mnt/data/TGSR$ python pretrain_DAMSM.py --cfg cfg/eval_birdSR_attn2.yml --gpu 0 /mnt/data/TGSR/miscc/config.py:107: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details. yaml_cfg = edict(yaml.load(f)) Using config: {'B_VALIDATION': False, 'CONFIG_NAME': '', 'CUDA': True, 'DATASET_NAME': 'birds', 'DATA_DIR': '../data/birds', 'DATA_DIRIM': '', 'GAN': {'B_ATTENTION': True, 'B_DCGAN': False, 'CONDITION_DIM': 100, 'DF_DIM': 64, 'GF_DIM': 32, 'R_NUM': 2, 'Z_DIM': 100}, 'GPU_ID': 0, 'METHOD': 'S8', 'RNN_TYPE': 'LSTM', 'TEXT': {'CAPTIONS_PER_IMAGE': 10, 'EMBEDDING_DIM': 256, 'WORDS_NUM': 18}, 'TRAIN': {'BATCH_SIZE': 1, 'B_NET_D': True, 'DISCRIMINATOR_LR': 0.0002, 'ENCODER_LR': 0.0002, 'FLAG': False, 'GENERATOR_LR': 0.0002, 'MAX_EPOCH': 600, 'NET_E': '../DAMSMencoders/bird/text_encoder200.pth', 'NET_G': '', 'RNN_GRAD_CLIP': 0.25, 'SMOOTH': {'GAMMA1': 5.0, 'GAMMA2': 5.0, 'GAMMA3': 10.0, 'LAMBDA': 1.0}, 'SNAPSHOT_INTERVAL': 2000}, 'TREE': {'BASE_SIZE': 32, 'BRANCH_NUM': 4}, 'WORKERS': 1} Traceback (most recent call last): File "pretrain_DAMSM.py", line 246, in transform=image_transform) File "/mnt/data/TGSR/datasets.py", line 299, in init self.embeddings_num = cfg.TEXT.CAPTIONS_PER_IMAGE AttributeError: 'NoneType' object has no attribute 'TEXT'

cxm12 commented 10 months ago

Please refer to for pertaining of the text encoder. 'https://github.com/Wentong-DST/attn-gan/tree/master'