Open RToF opened 1 year ago
When normalize my input images with following func:
def normalize(self, image): # image_mean = [0.485, 0.456, 0.406], image_std = [0.229, 0.224, 0.225] dtype, device = image.dtype, image.device mean = torch.as_tensor(self.image_mean, dtype=dtype, device=device) std = torch.as_tensor(self.image_std, dtype=dtype, device=device) return (image - mean[:, None, None]) / std[:, None, None]
TypeError: to() takes from 0 to 4 positional arguments but 5 were given
And the stack : call, jit_translate.py:244 init, infer_mask.py:80 update_direct_sparsity, compressor.py:235 infer_modules_masks, compressor.py:381 speedup_model, compressor.py:544
When normalize my input images with following func:
TypeError: to() takes from 0 to 4 positional arguments but 5 were given
And the stack : call, jit_translate.py:244 init, infer_mask.py:80 update_direct_sparsity, compressor.py:235 infer_modules_masks, compressor.py:381 speedup_model, compressor.py:544