lucfra / FAR-HO

Gradient based hyperparameter optimization & meta-learning package for TensorFlow
MIT License
186 stars 47 forks source link

hyper_representation.py OOM error on default miniImageNet settings #9

Closed AmirooR closed 6 years ago

AmirooR commented 6 years ago

Hi @lucfra While I wanted to try miniImageNet for meta batch size > 1, I got out of memory errors (tried on gtx 1080 and titax X gpus). Below is the code:

from hyper_representation import train, mini_imagenet_model

if __name__ == '__main__':
  CLASSES = 5
  SHOTS = 1
  META_BATCH_SIZE = 2
  from experiment_manager.datasets import load
  mini_imagenet = load.meta_mini_imagenet(std_num_classes=CLASSES,
                                          std_num_examples=(SHOTS*CLASSES, 15*CLASSES), h5=False, load_all_images=True)
  res = train(mini_imagenet, 'maml', mini_imagenet_model, T=1, print_every=500, MBS=META_BATCH_SIZE, n_episodes_testing=150, patience=20)

Could you please let me know how you ran the miniImageNet experiments?

Thanks

lucfra commented 6 years ago

Hi @AmirooR

I've copy pasted your code and run it into a notbeook and had no problem. Only thing I changed was using h5=True which uses hdf5 encoding for data file (I can send if you want). Do you run out of RAM or GPU memory? Does it happen as soon as you launch the experiment or after a while?

Cheers,

Luca

immagine

AmirooR commented 6 years ago

Hi @lucfra ,

I changed to anaconda python 3.5.3 and tensorflow 1.2 and the issue was solved. Before that, I was using system's python 3.5.2 and tensorflow 1.4.1.

Best, Amir