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

C3D training from scratch #12

Open
anguszxd opened this issue Jan 16, 2019 · 10 comments
Open

C3D training from scratch #12

anguszxd opened this issue Jan 16, 2019 · 10 comments

Comments

@anguszxd
Copy link

hi @jfzhang95 , thanks for your code. I'm trying to train C3D model from scratch using your code. I haven't change any setting. After several epoches, the training loss remains to be NaN. What should I do to train C3D model from scratch ? I'm using UCF101 dataset.

@rambleramble
Copy link

I encountered the same issue. any suggestion?

@cantonioupao
Copy link

Same issue here when i tried to implement the model to the breakfast dataset

@jfzhang95
Copy link
Owner

Did you check your PyTorch version? This whole project is based on PyTorch 0.4.0.
Also you could reduce the learning rate.

@JimReno
Copy link

JimReno commented Mar 20, 2019

@rambleramble I do set the learning rate to 1e5 when I do transfer learning on my own data set. please try to reduce the learning rate

@NirajDharamshi
Copy link

When training on UCF-101 dataset, I am getting 'ValueError: Range cannot be empty (low >= high) unless no samples are taken'.I didn't change any code. Any idea what could be the issue.

@shaofulien
Copy link

When training on UCF-101 dataset, I am getting 'ValueError: Range cannot be empty (low >= high) unless no samples are taken'.I didn't change any code. Any idea what could be the issue.

It happens because some video doesn't have frame more than 16. you can modify the code in the crop func.

 def crop(self, buffer, clip_len, crop_size):
    # randomly select time index for temporal jittering
    if (buffer.shape[0]<=16):
        time_index=0
    else:
        time_index = np.random.randint(buffer.shape[0] - clip_len)

@goforfar
Copy link

goforfar commented May 6, 2019

Hi! I try the code with TITANXp 12Gb, but before it starts training, it reported that "Runtimerror: cuda out of memory".
Do your guys meet the same issues?
Could anyone give some ideas for me.....Thanks

@meisa233
Copy link

Hi! I try the code with TITANXp 12Gb, but before it starts training, it reported that "Runtimerror: cuda out of memory".
Do your guys meet the same issues?
Could anyone give some ideas for me.....Thanks

I encountered the same issue. Then I reduced the batch size to 4 and it works.
As you can see, it requires a big memory.

@mbilalshaikh
Copy link

When training on UCF-101 dataset, I am getting 'ValueError: Range cannot be empty (low >= high) unless no samples are taken'.I didn't change any code. Any idea what could be the issue.

It happens because some video doesn't have frame more than 16. you can modify the code in the crop func.

 def crop(self, buffer, clip_len, crop_size):
    # randomly select time index for temporal jittering
    if (buffer.shape[0]<=16):
        time_index=0
    else:
        time_index = np.random.randint(buffer.shape[0] - clip_len)

I update this way but still receiving the below error.

RuntimeError: stack expects each tensor to be equal size, but got [3, 0, 112, 112] at entry 0 and [3, 16, 112, 112] at entry 2

@jacklove233
Copy link

在 UCF-101 数据集上训练时,我收到“ValueError: Range cannot be empty (low >= high)除非没有采样”。我没有更改任何代码。知道可能是什么问题。

发生这种情况是因为某些视频的帧数不超过 16。您可以在crop func 中修改代码。

 def crop(self, buffer, clip_len, crop_size):
    # randomly select time index for temporal jittering
    if (buffer.shape[0]<=16):
        time_index=0
    else:
        time_index = np.random.randint(buffer.shape[0] - clip_len)

我以这种方式更新,但仍然收到以下错误。

运行时错误:堆栈期望每个张量的大小相等,但在条目 0 处为 [3, 0, 112, 112],在条目 2 处为 [3, 16, 112, 112]

Have you solved this problem now? Can you tell me how to solve it?

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