NVIDIA / partialconv

A New Padding Scheme: Partial Convolution based Padding
Other
1.22k stars 213 forks source link

TypeError: mul() received an invalid combination of arguments - got (Tensor, NoneType), but expected one of: #7

Open Dong1P opened 5 years ago

Dong1P commented 5 years ago

I was impressed with your efficient padding method. So I used your method in my code. But I have a problem.

error : raw_out = super(PartialConv2d, self).forward(torch.mul(input, mask) TypeError: mul() received an invalid combination of arguments - got (Tensor, NoneType), but expected one of:

If you have any other way to fix this error, can you recommend it?

Thank you for opening the code.

liuguilin1225 commented 5 years ago

I just changed the line https://github.com/NVIDIA/partialconv/blob/master/models/partialconv2d.py#L70 Please let me know if it doesn't work.