Closed abhaygargab closed 4 years ago
I could compile pytorch from source after the required modifications in CMakeLists.txt and replace the video folder with the customized_ops/video using Python=3.6, but your code seems to work with Python=2.7 only..
I tried compiling Pytorch using Python=2.7 but that is not possible as Python=2.7 has become obsolete.
Can you help on this issue please?
ThankYou
Sorry to hear you’re having issues with installation . This work was done before caffe2 was merged with Pytorch (the exact commit is in the repo as a submodule), with python 2.7. Unfortunately I’m unable to keep it updated with the latest libraries; though it seems from your earlier error message that it’s not able to find the customized video reader op that is separately provided in the non local codebase. Maybe one way could be to copy those additional ops from non local to caffe2 code and then compile caffe2?
Thank You for you response. I am really having a difficult time compiling caffe2 following the steps mentioned in the repo using Python = 2.7. Can you please point me to the commit you are referring?
xiaolonw's caffe2 repository is missing some modules, and the official version of caffe2 (merged with Pytorch) doesn't support Python = 2.7.
Is there any way your code can be ported to Python=3.6 ?
You can find the caffe2 commit here: https://github.com/rohitgirdhar/CATER/tree/master/baselines The error in the previous message suggests the customized video loading ops were not installed, which would need to be compiled from source
Thanks for your comments
Hello Rohit, I am getting the following error while running- "python launch.py -c configs_cater/001_I3D_NL_localize_imagenetPretrained_32f_8SR.yaml -t test"
Traceback (most recent call last): File "tools/test_net_video.py", line 351, in
main()
File "tools/test_net_video.py", line 346, in main
store_vis=args.store_vis)
File "tools/test_net_video.py", line 294, in test_net
store_vis=store_vis)
File "tools/test_net_video.py", line 110, in test_net_one_section
test_model.build_model()
File "/home/u1698461/Downloads/CATER-master/baselines/video-nonlocal-net/lib/models/model_builder_video.py", line 119, in build_model
train=self.train, force_fw_only=self.force_fw_only
File "/home/u1698461/Downloads/CATER-master/baselines/video-nonlocal-net/lib/models/model_builder_video.py", line 230, in create_data_parallel_model
use_nccl=not cfg.DEBUG, # org: True
File "/home/u1698461/anaconda3/envs/last/lib/python2.7/site-packages/caffe2/python/data_parallel_model.py", line 39, in Parallelize_GPU
Parallelize(*args, **kwargs)
File "/home/u1698461/anaconda3/envs/last/lib/python2.7/site-packages/caffe2/python/data_parallel_model.py", line 236, in Parallelize
input_builder_fun(model_helper_obj)
File "/home/u1698461/Downloads/CATER-master/baselines/video-nonlocal-net/lib/models/model_builder_video.py", line 207, in add_video_input
batch_size=batch_size,
File "/home/u1698461/Downloads/CATER-master/baselines/video-nonlocal-net/lib/models/model_builder_video.py", line 171, in AddVideoInput
data, label = model.net.CustomizedVideoInput(
File "/home/u1698461/anaconda3/envs/last/lib/python2.7/site-packages/caffe2/python/core.py", line 2205, in getattr
",".join(workspace.C.nearby_opnames(op_type)) + ']'
AttributeError: Method CustomizedVideoInput is not a registered operator. Did you mean: []
Can you please guide me to the procedure you followed to install caffe2??
I used the following command to install caffe2 with python=2.7: conda install pytorch-nightly-cpu -c pytorch