You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
dataset [CocoDataset] of size 8 was created
Network [SPADEGenerator] was created. Total number of parameters: 97.5 million. To see the architecture, do print(network).
Traceback (most recent call last):
File "test.py", line 36, in
generated = model(data_i, mode='inference')
File "/home/torbjoern/anaconda3/envs/ml/lib/python3.6/site-packages/torch/nn/modules/module.py", line 532, in call
result = self.forward(*input, **kwargs)
File "/mnt/c/Users/torbjorn/Projects/Github/SPADE-master/models/pix2pix_model.py", line 42, in forward
input_semantics, real_image = self.preprocess_input(data)
File "/mnt/c/Users/torbjorn/Projects/Github/SPADE-master/models/pix2pix_model.py", line 128, in preprocess_input
instance_edge_map = self.get_edges(inst_map)
File "/mnt/c/Users/torbjorn/Projects/Github/SPADE-master/models/pix2pix_model.py", line 240, in get_edges
edge[:, :, :, 1:] = edge[:, :, :, 1:] | (t[:, :, :, 1:] != t[:, :, :, :-1])
RuntimeError: Expected object of scalar type Byte but got scalar type Bool for argument #2 'other' in call to _th_or
Using torch 1.4.0
The text was updated successfully, but these errors were encountered:
Me too! I've fixed this issue.
I think this is the version issue of Pytorch 1.4. In pytorch 1.4, you could not conduct or operation between a ByteTensor and a BoolTensor. You need to cast the BoolTensor to ByteTensor like this
Ran: python test.py --name coco_pretrained --dataset_mode coco --dataroot datasets/coco_stuff/ --gpu_ids -1
dataset [CocoDataset] of size 8 was created
Network [SPADEGenerator] was created. Total number of parameters: 97.5 million. To see the architecture, do print(network).
Traceback (most recent call last):
File "test.py", line 36, in
generated = model(data_i, mode='inference')
File "/home/torbjoern/anaconda3/envs/ml/lib/python3.6/site-packages/torch/nn/modules/module.py", line 532, in call
result = self.forward(*input, **kwargs)
File "/mnt/c/Users/torbjorn/Projects/Github/SPADE-master/models/pix2pix_model.py", line 42, in forward
input_semantics, real_image = self.preprocess_input(data)
File "/mnt/c/Users/torbjorn/Projects/Github/SPADE-master/models/pix2pix_model.py", line 128, in preprocess_input
instance_edge_map = self.get_edges(inst_map)
File "/mnt/c/Users/torbjorn/Projects/Github/SPADE-master/models/pix2pix_model.py", line 240, in get_edges
edge[:, :, :, 1:] = edge[:, :, :, 1:] | (t[:, :, :, 1:] != t[:, :, :, :-1])
RuntimeError: Expected object of scalar type Byte but got scalar type Bool for argument #2 'other' in call to _th_or
Using torch 1.4.0
The text was updated successfully, but these errors were encountered: