Traceback (most recent call last):
File "./codec.py", line 608, in <module>
main(sys.argv[1:])
File "./codec.py", line 602, in main
encode(argv)
File "./codec.py", line 560, in encode
_encode(
File "./codec.py", line 381, in _encode
out = encode_func[codec_type](input, codec_info, output)
File "./codec.py", line 274, in encode_image
out = codec.net.compress(x)
File "/root/miniconda3/lib/python3.8/site-packages/compressai/models/google.py", line 155, in compress
y = self.g_a(x)
File "/root/miniconda3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1194, in _call_impl
return forward_call(*input, **kwargs)
File "/root/miniconda3/lib/python3.8/site-packages/torch/nn/modules/container.py", line 204, in forward
input = module(input)
File "/root/miniconda3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1194, in _call_impl
return forward_call(*input, **kwargs)
File "/root/miniconda3/lib/python3.8/site-packages/torch/nn/modules/conv.py", line 463, in forward
return self._conv_forward(input, self.weight, self.bias)
File "/root/miniconda3/lib/python3.8/site-packages/torch/nn/modules/conv.py", line 459, in _conv_forward
return F.conv2d(input, weight, bias, self.stride,
RuntimeError: Input type (torch.FloatTensor) and weight type (torch.cuda.FloatTensor) should be the same or input should be a MKLDNN tensor and weight is a dense tensor
I know maybe it is due to the fact that input is on cpu but weights are on gpu. but how can i fix it?
thank you very much.
could you please figure that why
the script I run:
python ./codec.py encode ./dataset/video1_1.jpg --num_of_frames 1 --model bmshj2018-factorized --metric mse -q 1 -o ./test.jpg --cuda
However I got:
I know maybe it is due to the fact that input is on cpu but weights are on gpu. but how can i fix it?
thank you very much. could you please figure that why