Skip to content
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

train ucsd #6

Open
DengMiao55 opened this issue Jul 31, 2019 · 8 comments
Open

train ucsd #6

DengMiao55 opened this issue Jul 31, 2019 · 8 comments

Comments

@DengMiao55
Copy link

Hi,thanks for your work。When I train it ,I get this error。

Traceback (most recent call last):
File "train.py", line 201, in
main()
File "train.py", line 192, in main
train_ucsdped2()
File "train.py", line 128, in train_ucsdped2
x_r, z, z_dist = model(x)
File "/home/dl/VSST/dm/novelty-detection-master/models/base.py", line 33, in call
return super(BaseModule, self).call(*args, **kwargs)
File "/home/dl/anaconda3/envs/pytorch0.4/lib/python3.7/site-packages/torch/nn/modules/module.py", line 477, in call
result = self.forward(*input, **kwargs)
File "/home/dl/VSST/dm/novelty-detection-master/models/LSA_ucsd.py", line 189, in forward
z = self.encoder(h)
File "/home/dl/VSST/dm/novelty-detection-master/models/base.py", line 33, in call
return super(BaseModule, self).call(*args, **kwargs)
File "/home/dl/anaconda3/envs/pytorch0.4/lib/python3.7/site-packages/torch/nn/modules/module.py", line 477, in call
result = self.forward(*input, **kwargs)
File "/home/dl/VSST/dm/novelty-detection-master/models/LSA_ucsd.py", line 62, in forward
h = self.conv(h)
File "/home/dl/anaconda3/envs/pytorch0.4/lib/python3.7/site-packages/torch/nn/modules/module.py", line 477, in call
result = self.forward(*input, **kwargs)
File "/home/dl/anaconda3/envs/pytorch0.4/lib/python3.7/site-packages/torch/nn/modules/container.py", line 91, in forward
input = module(input)
File "/home/dl/VSST/dm/novelty-detection-master/models/base.py", line 33, in call
return super(BaseModule, self).call(*args, **kwargs)
File "/home/dl/anaconda3/envs/pytorch0.4/lib/python3.7/site-packages/torch/nn/modules/module.py", line 477, in call
result = self.forward(*input, **kwargs)
File "/home/dl/VSST/dm/novelty-detection-master/models/blocks_3d.py", line 133, in forward
activation_fn=self._activation_fn
File "/home/dl/VSST/dm/novelty-detection-master/models/blocks_3d.py", line 33, in residual_op
ha = f1(ha)
File "/home/dl/VSST/dm/novelty-detection-master/models/base.py", line 33, in call
return super(BaseModule, self).call(*args, **kwargs)
File "/home/dl/anaconda3/envs/pytorch0.4/lib/python3.7/site-packages/torch/nn/modules/module.py", line 477, in call
result = self.forward(*input, **kwargs)
File "/home/dl/VSST/dm/novelty-detection-master/models/layers/mconv3d.py", line 29, in forward
return super(MaskedConv3d, self).forward(x)
File "/home/dl/anaconda3/envs/pytorch0.4/lib/python3.7/site-packages/torch/nn/modules/conv.py", line 421, in forward
self.padding, self.dilation, self.groups)
RuntimeError: Expected 5-dimensional input for 5-dimensional weight [8, 1, 3, 3, 3], but got input of size [105, 690, 1, 8, 32, 32] instead

@DavideA
Copy link
Contributor

DavideA commented Jul 31, 2019

Hi,

I think you are not using the correct collate function in the DataLoader.
One quick way to patch this is to reshape the input tensor before feeding the network:

x_in = x_in.view(-1, *x_in.shape[2:])

Hope this helps,
D

@DengMiao55
Copy link
Author

@DavideA thank you,it‘s useful。 but I can't use the batch_size mentioned in the paper 。Do I need to use multiple GPUs?

@DavideA
Copy link
Contributor

DavideA commented Jul 31, 2019

I used a single 12GB GPU.
I'd say you could reduce the batch size and give it a try.

D

@DengMiao55
Copy link
Author

@DavideA Hi,I try to recurring your result in cifar ,but I only get AUC 0.6. could you tell me more about the detail about training。 thanks

@liuem607
Copy link

Hi, I have a similar question regarding input size. If my dataloader works correctly, the input data size before patching as you mentioned is [1, 690, 1, 8, 32, 32]. If I understand correctly, this first 1 is batch_size, and 8 is 8 sequential frames, and 32*32 is resized frame shape. But what is 690?

Also, the original image size is 256384, isn't 3232 too small?

Thank you in advance!

@ColaWithIce
Copy link

@DavideA Hi,I try to recurring your result in cifar ,but I only get AUC 0.6. could you tell me more about the detail about training。 thanks

Hi, where did you get the training code?

@shen-yao
Copy link

@DavideA Hi,I try to recurring your result in cifar ,but I only get AUC 0.6. could you tell me more about the detail about training。 thanks

Hi, where did you get the training code?

Same question please

@BenedictGreen
Copy link

Thx for the great work! I got same question about the details about training. hoping for author uploading the training code.@DavideA
thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants