Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

i have some problem do a test

See original GitHub issue

I would like to test network on UCF101 after finetune in UCF101 using pretrained kinetics you provided.

i use resnet18. I want to get the accuracy of a video unit, not clip.

i use instruction below

python --root_path UCF101 --video_path jpg --annotation_path ucf101_01.json --result_path test --dataset ucf101 --model resnet --model_depth 18 --n_classes 101 --batch_size 64 --n_threads 4 --pretrain_path 18result1s/save_200.pth --no_train --no_val --test --test_subset val --n_finetune_classes 101

jpg is the same as your data directory. 18results1s/save_200.pth is pretrained on Kinetics, finetune in UCF101’s network.

it make a error.

run dataset loading [0/3783] dataset loading [1000/3783] dataset loading [2000/3783] dataset loading [3000/3783] test UserWarning: volatile was removed and now has no effect. Use with torch.no_grad(): instead. inputs = Variable(inputs, volatile=True) UserWarning: Implicit dimension choice for softmax has been deprecated. Change the call to include dim=X as an argument. outputs = F.softmax(outputs) Traceback (most recent call last): File “”, line 162, in <module> test.test(test_loader, model, opt, test_data.class_names) File “”, line 50, in test test_results, class_names) File “”, line 20, in calculate_video_results ‘label’: class_names[locs[i]], KeyError: tensor(12)

KeyError : tensor(12) , i change my instruction, the number in parentheses is change, maybe.

can you help me?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

hareeshdevarakondacommented, May 25, 2018

@lee2h Hope this should help you similar kind of error i got please try in this way that is zero tensor error

video_results = [] for i in range(sorted_scores.size(0)): video_results.append({ ‘label’: class_names[torch.Tensor.item(locs[i])], ‘score’: float(sorted_scores[i]) })

lee2hcommented, May 29, 2018

in command, i change pretrain_path to resume_path, it works well. i get UCF101 split 1, 82.2% video accuracy.

i will train and evaluate for another split and pytorch 0.5. if there is no problem, i will close this issue.

thank you for your awesome work.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Take a Mental Health Test - MHA Screening
Online screening is one of the quickest and easiest ways to determine whether you are experiencing symptoms of a mental health condition.
Read more >
Test Anxiety (for Teens) - Nemours KidsHealth
Test anxiety can be a real problem if you're so stressed out over a test that you can't get past the nervousness to...
Read more >
Screening Tests for Common Diseases
A screening test is done to detect potential health disorders or diseases in people who do not have any symptoms of disease. The...
Read more >
Test anxiety: Can it be treated? - Mayo Clinic
Test anxiety can interfere with your performance: Here's what you can do. ... Here are some strategies that may help reduce your test...
Read more >
Some students perform poorly on tests for reasons other than ...
Some students perform poorly on tests for reasons other than lack of preparation or poor study skills. This common problem is called test...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found