Git Product home page Git Product logo

e3bm's Introduction

Hey there, I'm Yaoyao! 👋

Welcome to my GitHub. I am currently a postdoc in Computer Science at Johns Hopkins University. My research lies at the intersection of computer vision and machine learning – with a special focus on building intelligent visual systems that are continual and data-efficient. If you have any questions on my projects, please feel free to send me an email.

e3bm's People

Contributors

yaoyao-liu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

e3bm's Issues

cannot find resnet-12 results in the published paper

Hi, thanks for the great work and releasing your code!

In the Readme, the results on resnet-12 under transductive setting are given for E3bm. However, I cannot find those numbers in the published paper. So I am just wondering is something wrong here?

Thanks!

About ResNet-12 and ResNet-25.

你好!
首先感谢分享这项有趣工作的代码。
1. 因为我是从MTL跟过来的,所以我不大清楚这个repo代码里的ResNet-12指的就是ECCV 20论文里的ResNet-25吗?因为我看这里的结果跟论文里报告的是一样的,但是网络结构写了个ResNet-12;
2. 我看这个repo里说网络结构是跟MetaOptNet一样,意思是MetaOptNet的ResNet-12跟MTL论文里的ResNet-12不一样吗?前者更深参数量更多?

最后再一次感谢你们的源代码,100%可复现没毛病!(除了hard task至今没有更新,哈哈)

Pretraining and optimizing parameters issues

Hi, thanks for sharing your excellent work.
I am trying to pretrain the model in my own dataset and an error occurs as shown below.

Start pre-train phase.
Rest for 0.000 hour:
logs/pre_train/soybean-resnet12
Epoch 1, total loss=5.9711 acc=0.0000: 100%|██| 600/600 [00:17<00:00, 34.51it/s]
0%| | 0/3000 [00:06<?, ?it/s]
Traceback (most recent call last):
File "main.py", line 104, in
trainer.pre_train()
File "/home/ubuntu/junwang/paper/bmvc/e3bm/trainer/meta_trainer.py", line 376, in pre_train
(data_shot, data_query))
File "/home/ubuntu/anaconda3/envs/bmvc/lib/python3.7/site-packages/torch/nn/modules/module.py", line 532, in call
result = self.forward(*input, **kwargs)
File "/home/ubuntu/anaconda3/envs/bmvc/lib/python3.7/site-packages/torch/nn/parallel/data_parallel.py", line 152, in forward
outputs = self.parallel_apply(replicas, inputs, kwargs)
File "/home/ubuntu/anaconda3/envs/bmvc/lib/python3.7/site-packages/torch/nn/parallel/data_parallel.py", line 162, in parallel_apply
return parallel_apply(replicas, inputs, kwargs, self.device_ids[:len(replicas)])
File "/home/ubuntu/anaconda3/envs/bmvc/lib/python3.7/site-packages/torch/nn/parallel/parallel_apply.py", line 85, in parallel_apply
output.reraise()
File "/home/ubuntu/anaconda3/envs/bmvc/lib/python3.7/site-packages/torch/_utils.py", line 394, in reraise
raise self.exc_type(msg)
TypeError: Caught TypeError in replica 0 on device 0.
Original Traceback (most recent call last):
File "/home/ubuntu/anaconda3/envs/bmvc/lib/python3.7/site-packages/torch/nn/parallel/parallel_apply.py", line 60, in _worker
output = module(*input, **kwargs)
File "/home/ubuntu/anaconda3/envs/bmvc/lib/python3.7/site-packages/torch/nn/modules/module.py", line 532, in call
result = self.forward(*input, **kwargs)
File "/home/ubuntu/junwang/paper/bmvc/e3bm/model/meta_model.py", line 158, in forward
return self.pretrain_forward(inputs)
File "/home/ubuntu/junwang/paper/bmvc/e3bm/model/meta_model.py", line 166, in pretrain_forward
return self.fc(self.encoder(input))
File "/home/ubuntu/anaconda3/envs/bmvc/lib/python3.7/site-packages/torch/nn/modules/module.py", line 532, in call
result = self.forward(*input, **kwargs)
File "/home/ubuntu/junwang/paper/bmvc/e3bm/model/resnet12.py", line 113, in forward
x = self.layer1(x)
File "/home/ubuntu/anaconda3/envs/bmvc/lib/python3.7/site-packages/torch/nn/modules/module.py", line 532, in call
result = self.forward(*input, **kwargs)
File "/home/ubuntu/anaconda3/envs/bmvc/lib/python3.7/site-packages/torch/nn/modules/container.py", line 100, in forward
input = module(input)
File "/home/ubuntu/anaconda3/envs/bmvc/lib/python3.7/site-packages/torch/nn/modules/module.py", line 532, in call
result = self.forward(*input, **kwargs)
File "/home/ubuntu/junwang/paper/bmvc/e3bm/model/resnet12.py", line 49, in forward
out = self.conv1(x)
File "/home/ubuntu/anaconda3/envs/bmvc/lib/python3.7/site-packages/torch/nn/modules/module.py", line 532, in call
result = self.forward(*input, **kwargs)
File "/home/ubuntu/anaconda3/envs/bmvc/lib/python3.7/site-packages/torch/nn/modules/conv.py", line 345, in forward
return self.conv2d_forward(input, self.weight)
File "/home/ubuntu/anaconda3/envs/bmvc/lib/python3.7/site-packages/torch/nn/modules/conv.py", line 342, in conv2d_forward
self.padding, self.dilation, self.groups)
TypeError: conv2d(): argument 'input' (position 1) must be Tensor, not tuple

In conclusion, the error is that the model takes tensor as input but a tuple (data_shot, data_query) are given.

In addition, I fould another problem:
When choosing the paratemers to be optimized in the optmizer, the ''self.model' seems incorrect as error occurs, I change 'self.model' to 'self.model.module', it works.
These errors may caused by the multi-gpu scenerio.
However, when I use only one gpu, an error below occurs,

Start pre-train phase.
Rest for 0.000 hour:
logs/pre_train/soybean-resnet12
Epoch 1, total loss=5.4935 acc=0.0000: 100%|██| 600/600 [00:12<00:00, 46.65it/s]
0%| | 0/3000 [00:00<?, ?it/s]
Traceback (most recent call last):
File "main.py", line 104, in
trainer.pre_train()
File "/home/ubuntu/junwang/paper/bmvc/e3bm/trainer/meta_trainer.py", line 376, in pre_train
(data_shot, data_query))
File "/home/ubuntu/anaconda3/envs/bmvc/lib/python3.7/site-packages/torch/nn/modules/module.py", line 532, in call
result = self.forward(*input, **kwargs)
File "/home/ubuntu/junwang/paper/bmvc/e3bm/model/meta_model.py", line 161, in forward
return self.meta_forward(data_shot, data_query)
File "/home/ubuntu/junwang/paper/bmvc/e3bm/model/meta_model.py", line 220, in meta_forward
grad = torch.autograd.grad(loss, fast_weights)
File "/home/ubuntu/anaconda3/envs/bmvc/lib/python3.7/site-packages/torch/autograd/init.py", line 157, in grad
inputs, allow_unused)
RuntimeError: element 0 of tensors does not require grad and does not have a grad_fn

I am grateful if you can provide any support to figure out the problem.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.