Open hcen001 opened 6 years ago
try with python2/anaconda2
I already tried to no avail. Got the same output.
Thanks.
Hi,
This issue is related to upgrading to the latest version of PyTorch (v0.4). See this issue for a potential solution.
Let me know if this helps.
Best, Alex A.
Hi @alexandonian,
Indeed, it worked. Thank you very much.
I have another related question: What is the minimum number of frames required for the provided test_video.py
script to work? I tested a folder with 10 frames and got the following error:
RuntimeError: invalid argument 2: size '[-1 x 8 x 256]' is invalid for input with 12800 elements at ...
I then copied the same files twice, for a total of 30 frames and it worked. Is there any minimum required number of frames?
Thanks in advance.
Which version of pytorch does the code work with? I figured I would download a previous version instead of the newest upgrade..
@hcen001, The pretrained models we release all need to be given 8 frames. This function here attempts to select 8 equally spaced frames from the ones you provide. In your case of 10 frames, this doesn't work properly (a step size of 2 is chosen and with 10 frames, only 5 are selected). Here, you will need to use a different strategy for selecting the frames. Perhaps you could even submit a PR with a fix for this?! If not, no worries.
@valeriechen, This code should work out-of-the-box with PyTorch v0.3. If you must use v0.4, then you will need to apply the workaround explained in this issue for now.
Namespace(arch='BNInception', batch_size=64, clip_gradient=20, consensus_type='TRN', dataset='somethingv2', dropout=0.8, epochs=120, eval_freq=5, evaluate=False, flow_prefix='', gpus=None, img_feature_dim=256, k=3, loss_type='nll', lr=0.001, lr_steps=[50, 100], modality='RGB', momentum=0.9, no_partialbn=False, num_segments=3, print_freq=20, resume='', root_log='log', root_model='model', root_output='output', root_path='', snapshot_pref='', start_epoch=0, store_name='', train_list='', val_list='', weight_decay=0.0005, workers=30) storing name: TRN_somethingv2_RGB_BNInception_TRN_segment3
Initializing TSN with base model: BNInception.
TSN Configurations:
input_modality: RGB
num_segments: 3
new_length: 1
consensus_module: TRN
dropout_ratio: 0.8
img_feature_dim: 256
/home/test/Desktop/TRN/TRN-pytorch/model_zoo/bninception/pytorch_load.py:13: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
manifest = yaml.load(open(model_path))
Traceback (most recent call last):
File "main.py", line 324, in
Please guide me to fix this error
Hello,
I cloned the repo as specified and tried running the example, but I got the following message:
The command I used was the following:
Tried running the example in the repo and with a frames folder of my own and got the same message.
Thanks in advance for any help you can provide