imbue-ai / self_supervised

A Pytorch-Lightning implementation of self-supervised algorithms
MIT License
536 stars 52 forks source link

Validation will not run with ImageNet #3

Closed sachit-menon closed 4 years ago

sachit-menon commented 4 years ago

Hi and thanks again for this great work! I've been able to match your reported results after training STL10 for a while, but I can't get things running with the config you've provided for ImageNet in the README - there's an error during validation that prevents things from running.

RuntimeError: invalid argument 0: Sizes of tensors must match except in dimension 0. Got 368 and 335 in dimension 2 at /pytorch/aten/src/TH/generic/THTensor.cpp:612

This can be seen before training starts if num_sanity_val_steps is allowed to be positive.

P.S. There are a few imports that appear to be missing:

abefetterman commented 4 years ago

Thanks a lot for the report! I've fixed the issue in the latest commit. We had not been actually running the validation during training of ImageNet to save time, but it is nice to get some indication of progress -- we recommend you use val_percent_check=0.1 when calling pl.Trainer for a good balance.