Closed lightfate closed 5 years ago
Hi, @lukemelas ~ I'm so excited about your code, but today, after i upgrade the pip package today, a new problem appeared:
C:\ProgramData\Anaconda3\lib\site-packages\efficientnet_pytorch\utils.py in drop_connect(inputs, p, training) 72 random_tensor += torch.rand([batch_size, 1, 1, 1], dtype=inputs.dtype) # uniform [0,1) 73 binary_tensor = torch.floor(random_tensor) ---> 74 output = inputs / keep_prob * binary_tensor 75 return output 76 RuntimeError: expected type torch.cuda.FloatTensor but got torch.FloatTensor
I sure that i don't change any of my code, just upgrade the pip package "efficientNet-Pytroch" in my code, i use your model like:
from efficientnet_pytorch import EfficientNet modelPre = EfficientNet.from_pretrained('efficientnet-b0')
See https://github.com/lukemelas/EfficientNet-PyTorch/issues/32
This is fixed in master :)
See #32 This is fixed in master :)
See #32
Thanks~
Hi, @lukemelas ~ I'm so excited about your code, but today, after i upgrade the pip package today, a new problem appeared:
C:\ProgramData\Anaconda3\lib\site-packages\efficientnet_pytorch\utils.py in drop_connect(inputs, p, training) 72 random_tensor += torch.rand([batch_size, 1, 1, 1], dtype=inputs.dtype) # uniform [0,1) 73 binary_tensor = torch.floor(random_tensor) ---> 74 output = inputs / keep_prob * binary_tensor 75 return output 76 RuntimeError: expected type torch.cuda.FloatTensor but got torch.FloatTensor
I sure that i don't change any of my code, just upgrade the pip package "efficientNet-Pytroch" in my code, i use your model like:
from efficientnet_pytorch import EfficientNet modelPre = EfficientNet.from_pretrained('efficientnet-b0')