HumaticsLAB / AttentionBasedMultiModalRNN

An unofficial Pytorch implementation of Attention based Multi-Modal New Product Sales Time-series Forecasting

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[bug report]

Xiaoxiong-Liu opened this issue · comments

self.color = [color_dict[x] for x in self.json_df['exact_color'].tolist()]

when I run python train.py --data_folder dataset

Traceback (most recent call last):
File "train.py", line 85, in
train_dataset = CustomImageDataset(config.TRAIN_DATASET, dataset_path, transform=ds_trans)
File "AttentionBasedMultiModalRNN-main/utils.py", line 32, in init
self.color = [color_dict[x] for x in self.json_df['exact_color'].tolist()]
File "/usr/local/anaconda3/lib/python3.6/site-packages/pandas/core/frame.py", line 2906, in getitem
indexer = self.columns.get_loc(key)
File "/usr/local/anaconda3/lib/python3.6/site-packages/pandas/core/indexes/base.py", line 2900, in get_loc
raise KeyError(key) from err
KeyError: 'exact_color'

The 'exact_color' is not in the colums of train.csv or test.csv, should it be 'color' ?

Can you check your code again to make sure that it can run directly?
I encountered a lot of bugs when I ran this code.

self.fabric = [fabric_dict[x] for x in self.json_df['texture'].tolist()]

KeyError: 'texture'
Maybe it is 'fabric' ?