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

Problems on reproducing the scores in the paper on ActivityNet. #4

Open
h-somehow opened this issue Jun 16, 2023 · 1 comment
Open

Comments

@h-somehow
Copy link

Dear @Huntersxsx, Thanks for your interesting work.

I have achieved similar results on Charades-sta and Tacos. However, I encountered a problem with ActivityNet.

"UserWarning: Detected call of lr_scheduler.step() before optimizer.step(). In PyTorch 1.1.0 and later, you should call them in the opposite order: optimizer.step() before lr_scheduler.step(). Failure to do this will result in PyTorch skipping the first value of the learning rate schedule. See more details at https://pytorch.org/docs/stable/optim.html#how-to-adjust-learning-rate
warnings.warn("Detected call of lr_scheduler.step() before optimizer.step(). ""

To address this issue, I made the following code modification:

# state['scheduler'].step()
if state['epoch'] > 0:
    state['scheduler'].step()

However, the obtained results are as follows:

R@1,IoU@0..5 = 46.1 (47.92 in paper)
R@1,IoU@0..7 = 29.34 (30.47 in paper)
R@5,IoU@0..5 = 76.26 (78.15 in paper)
R@5,IoU@0..7 = 63.11 (63.56 in paper)

I have already set torch.backends.cudnn.deterministic = False and cudnn.benchmark = True, and I have tried many times, but the best results obtained were the ones mentioned above. Even if I ignore the warning, the performance gap still exists.

I used 4 GPUs and set the training batch size to 64 on ActivityNet. Is there anything else I should change in the code?

Looking forward to your reply.

@akzeycgdn265
Copy link

Dear @Huntersxsx, Thanks for your interesting work.

I have achieved similar results on Charades-sta and Tacos. However, I encountered a problem with ActivityNet.

"UserWarning: Detected call of lr_scheduler.step() before optimizer.step(). In PyTorch 1.1.0 and later, you should call them in the opposite order: optimizer.step() before lr_scheduler.step(). Failure to do this will result in PyTorch skipping the first value of the learning rate schedule. See more details at https://pytorch.org/docs/stable/optim.html#how-to-adjust-learning-rate
warnings.warn("Detected call of lr_scheduler.step() before optimizer.step(). ""

To address this issue, I made the following code modification:

# state['scheduler'].step()
if state['epoch'] > 0:
    state['scheduler'].step()

However, the obtained results are as follows:

R@1,IoU@0..5 = 46.1 (47.92 in paper)
R@1,IoU@0..7 = 29.34 (30.47 in paper)
R@5,IoU@0..5 = 76.26 (78.15 in paper)
R@5,IoU@0..7 = 63.11 (63.56 in paper)

I have already set torch.backends.cudnn.deterministic = False and cudnn.benchmark = True, and I have tried many times, but the best results obtained were the ones mentioned above. Even if I ignore the warning, the performance gap still exists.

I used 4 GPUs and set the training batch size to 64 on ActivityNet. Is there anything else I should change in the code?

Looking forward to your reply.

Hello! I have the same problem as you. Have you solved 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

2 participants