Hi😄 thanks for your code and paper,but i meet an error when i run:
CUDA_VISIBLE_DEVICES=0 python run_sample.py --voc12_root /data1/xjheng/dataset/VOC2012/ --hyper 10,24,1,0.2 --clims_num_epoches 15 --cam_eval_thres 0.15 --work_space clims_voc12 --cam_network net.resnet50_clims --train_clims_pass True --make_clims_pass True --eval_cam_pass True
error happend:
Traceback (most recent call last):
File "/home/anaconda3/lib/python3.8/site-packages/clip/clip.py", line 129, in load
model = torch.jit.load(opened_file, map_location=device if jit else "cpu").eval()
File "/home/anaconda3/lib/python3.8/site-packages/torch/jit/init.py", line 277, in load
cpp_module = torch._C.import_ir_module_from_buffer(cu, f.read(), map_location, _extra_files)
RuntimeError:
aten::_convolution(Tensor input, Tensor weight, Tensor? bias, int[] stride, int[] padding, int[] dilation, bool transposed, int[] output_padding, int groups, bool benchmark, bool deterministic, bool cudnn_enabled) -> (Tensor):
Expected at most 12 arguments but found 13 positional arguments.
:
/opt/conda/lib/python3.7/site-packages/torch/nn/modules/conv.py(420): _conv_forward
/opt/conda/lib/python3.7/site-packages/torch/nn/modules/conv.py(423): forward
/opt/conda/lib/python3.7/site-packages/torch/nn/modules/module.py(709): _slow_forward
/opt/conda/lib/python3.7/site-packages/torch/nn/modules/module.py(725): _call_impl
/root/workspace/multimodal-pytorch/multimodal/model/multimodal_transformer.py(85): forward
/opt/conda/lib/python3.7/site-packages/torch/nn/modules/module.py(709): _slow_forward
/opt/conda/lib/python3.7/site-packages/torch/nn/modules/module.py(725): _call_impl
/root/workspace/multimodal-pytorch/multimodal/model/multimodal_transformer.py(221): visual_forward
/opt/conda/lib/python3.7/site-packages/torch/jit/_trace.py(940): trace_module
(36): export_torchscript_models
(3):
/opt/conda/lib/python3.7/site-packages/IPython/core/interactiveshell.py(3418): run_code
/opt/conda/lib/python3.7/site-packages/IPython/core/interactiveshell.py(3338): run_ast_nodes
/opt/conda/lib/python3.7/site-packages/IPython/core/interactiveshell.py(3147): run_cell_async
/opt/conda/lib/python3.7/site-packages/IPython/core/async_helpers.py(68): _pseudo_sync_runner
/opt/conda/lib/python3.7/site-packages/IPython/core/interactiveshell.py(2923): _run_cell
/opt/conda/lib/python3.7/site-packages/IPython/core/interactiveshell.py(2878): run_cell
/opt/conda/lib/python3.7/site-packages/IPython/terminal/interactiveshell.py(555): interact
/opt/conda/lib/python3.7/site-packages/IPython/terminal/interactiveshell.py(564): mainloop
/opt/conda/lib/python3.7/site-packages/IPython/terminal/ipapp.py(356): start
/opt/conda/lib/python3.7/site-packages/traitlets/config/application.py(845): launch_instance
/opt/conda/lib/python3.7/site-packages/IPython/__init__.py(126): start_ipython
/opt/conda/bin/ipython(8):
Serialized File "code/__torch__/torch/nn/modules/conv/___torch_mangle_9366.py", line 8
def forward(self: __torch__.torch.nn.modules.conv.___torch_mangle_9366.Conv2d,
input: Tensor) -> Tensor:
x = torch._convolution(input, self.weight, None, [32, 32], [0, 0], [1, 1], False, [0, 0], 1, False, False, True, True)
~~~~~~~~~~~~~~~~~~ <--- HERE
return x
def forward1(self: __torch__.torch.nn.modules.conv.___torch_mangle_9366.Conv2d,
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "run_sample.py", line 144, in
step.train_clims.run(args)
File "/home/lihaoyu/CLIMS/step/train_clims.py", line 101, in run
clip_model, preprocess = clip.load(args.clip, device=device)
File "/home/lihaoyu/anaconda3/lib/python3.8/site-packages/clip/clip.py", line 136, in load
state_dict = torch.load(opened_file, map_location="cpu")
File "/home/lihaoyu/anaconda3/lib/python3.8/site-packages/torch/serialization.py", line 585, in load
return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
File "/home/lihaoyu/anaconda3/lib/python3.8/site-packages/torch/serialization.py", line 755, in _legacy_load
magic_number = pickle_module.load(f, **pickle_load_args)
EOFError: Ran out of input
how can i solve it?
Hi😄 thanks for your code and paper,but i meet an error when i run:
CUDA_VISIBLE_DEVICES=0 python run_sample.py --voc12_root /data1/xjheng/dataset/VOC2012/ --hyper 10,24,1,0.2 --clims_num_epoches 15 --cam_eval_thres 0.15 --work_space clims_voc12 --cam_network net.resnet50_clims --train_clims_pass True --make_clims_pass True --eval_cam_pass True
error happend: Traceback (most recent call last): File "/home/anaconda3/lib/python3.8/site-packages/clip/clip.py", line 129, in load model = torch.jit.load(opened_file, map_location=device if jit else "cpu").eval() File "/home/anaconda3/lib/python3.8/site-packages/torch/jit/init.py", line 277, in load cpp_module = torch._C.import_ir_module_from_buffer(cu, f.read(), map_location, _extra_files) RuntimeError: aten::_convolution(Tensor input, Tensor weight, Tensor? bias, int[] stride, int[] padding, int[] dilation, bool transposed, int[] output_padding, int groups, bool benchmark, bool deterministic, bool cudnn_enabled) -> (Tensor): Expected at most 12 arguments but found 13 positional arguments. : /opt/conda/lib/python3.7/site-packages/torch/nn/modules/conv.py(420): _conv_forward /opt/conda/lib/python3.7/site-packages/torch/nn/modules/conv.py(423): forward /opt/conda/lib/python3.7/site-packages/torch/nn/modules/module.py(709): _slow_forward /opt/conda/lib/python3.7/site-packages/torch/nn/modules/module.py(725): _call_impl /root/workspace/multimodal-pytorch/multimodal/model/multimodal_transformer.py(85): forward /opt/conda/lib/python3.7/site-packages/torch/nn/modules/module.py(709): _slow_forward /opt/conda/lib/python3.7/site-packages/torch/nn/modules/module.py(725): _call_impl /root/workspace/multimodal-pytorch/multimodal/model/multimodal_transformer.py(221): visual_forward /opt/conda/lib/python3.7/site-packages/torch/jit/_trace.py(940): trace_module