google-research / meta-dataset

A dataset of datasets for learning to learn from few examples
Apache License 2.0
762 stars 139 forks source link

Filing a bug for CrossTransformers code as suggested by Carl Doersch #73

Closed quantacode closed 3 years ago

quantacode commented 3 years ago

Hi, When I run the following command for evaluating cross transformers

export EXPNAME=ctx export DATASET=omniglot python -m meta_dataset.train \ --is_training=False \ --records_root_dir=$RECORDS \ --summary_dir=${EXPROOT}/summaries/${EXPNAME}eval$DATASET \ --gin_config=meta_dataset/learn/gin/default/crosstransformer_imagenet.gin \ --gin_bindings="Trainer.experiment_name='${EXPNAME}'" \ --gin_bindings="Trainer.checkpoint_to_restore='experiments/checkpoints/ctx_pretr/ctx.ckpt'" \ --gin_bindings="benchmark.eval_datasets='$DATASET'"

I get the error:

File "/home/rajshekd/projects/FSG/CTX/meta_dataset/models/functional_backbones.py", line 369, in conv_bn depth[0], TypeError: 'int' object is not subscriptable

Additionally in

line 375 of File "/home/rajshekd/projects/FSG/CTX/meta_dataset/models/functional_backbones.py", input_rate is not defined

Can you help resolve this?

cdoersch commented 3 years ago

@eleniTriantafillou Something funny is happening in functional backbones line 366:

https://github.com/google-research/meta-dataset/blob/main/meta_dataset/models/functional_backbones.py#L366

conv_bn seems to be calling itself. I think there may be an issue with how the code is getting exported to github.

lamblin commented 3 years ago

I found something funny indeed, I'll send a fix soon. Sorry about the delay.

eleniTriantafillou commented 3 years ago

Thank you so much Pascal! :)

On Wed, Sep 8, 2021 at 1:28 AM Pascal Lamblin @.***> wrote:

I found something funny indeed, I'll send a fix soon. Sorry about the delay.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/google-research/meta-dataset/issues/73#issuecomment-914668307, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA3R53JWQM343VFL5BZHIDDUA2GWZANCNFSM5CBPK5JA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

lamblin commented 3 years ago

Done, thanks for the report!