Skip to content

log_vml_cpu not implemented for 'Long' #14

@MistSun-Chen

Description

@MistSun-Chen

Traceback (most recent call last):
File "Situation3.py", line 187, in
print("random.choice(style_dataset)",random.choice(style_dataset))
File "/home/guest/cwy/miniconda3/lib/python3.8/random.py", line 291, in choice
return seq[i]
File "/home/guest/cwy/miniconda3/lib/python3.8/site-packages/torchvision/datasets/folder.py", line 153, in getitem
sample = self.transform(sample)
File "/home/guest/cwy/miniconda3/lib/python3.8/site-packages/torchvision/transforms/transforms.py", line 67, in call
img = t(img)
File "/home/guest/cwy/miniconda3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/guest/cwy/miniconda3/lib/python3.8/site-packages/torchvision/transforms/transforms.py", line 823, in forward
i, j, h, w = self.get_params(img, self.scale, self.ratio)
File "/home/guest/cwy/miniconda3/lib/python3.8/site-packages/torchvision/transforms/transforms.py", line 787, in get_params
log_ratio = torch.log(torch.tensor(ratio))
RuntimeError: log_vml_cpu not implemented for 'Long'

when I run python Situation3.py,I got this question .Does anyone has the same problem?How to solve this problem?Hope someone can reply

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions