-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NotImplementedError while loading Distillation dataset #4
Comments
Thanks for reaching out us! Below is the instruction provided by Doctor Zangwei Zheng: First, download Validation_GCC-1.1.0-Validation.tsv from the Conceptual Captions dataset here. python gather_cc.py Validation_GCC-1.1.0-Validation.tsv |
Thanks, but the question is not how to create Validation_GCC-1.1.0-Validation_output.csv, Its totally different. I have already done these steps and I have Validation_GCC-1.1.0-Validation_output.csv file, but the code gives me mentioned error, something about conceptual_captions(Dataset) class should be wrong, but I dont understand why. The error explains that there is no getitem function implemented for conceptual_captions class, but it is implemented. Below is the cc.py I have only changed the path to .csv file and added two print() blocks, apparently initialization is fine but getitem never called.
|
Okey I found the problem and the solution seems to work now. In cc.py class conceptual_captions(Dataset) is defined already as a class inherited from Dataset, and it initialize an instance of CSVDataset by self.train_dataset = CsvDataset(...) but it never use it.... That's why print("INIT) line was working but not print("GETITEM") line, because when in models.py in line 232 ref_images, ref_labels = next(ref_iter) call made, it calls the getitem of conceptual_captions class, since ref_iter is an instance of this class. But there is no getitem function in this class so it doesnt work. I will make a pull request about that to push the fixed code soon! |
Hello, I try to use zscl method with the suggested datasets (ImageNet and Conceptual Captions). I prepared the distillation dataset using https://github.com/ml-jku/cloob repository so I have "Validation_GCC-1.1.0-Validation_output.csv" file already. But it throws me the following error:
0%| | 0/1301 [00:00<?, ?it/s]
Error executing job with overrides: []
Traceback (most recent call last):
File "main.py", line 51, in continual_clip
model.adaptation(task_id, cfg, train_dataset, train_classes_names)
File "/workspace/ZSCL/cil/continual_clip/models.py", line 48, in adaptation
self.train(task_id, cfg, train_dataset, train_classes_names)
File "/workspace/ZSCL/cil/continual_clip/models.py", line 230, in train
ref_images, ref_labels = next(ref_iter)
File "/opt/conda/lib/python3.7/site-packages/torch/utils/data/dataset.py", line 33, in getitem
raise NotImplementedError
NotImplementedError
I know that the problem is about Distillation Dataset (Conceptual Captions) but I cant fix it. Can anybody help??
The text was updated successfully, but these errors were encountered: