Pytorch Error: RuntimeError: value cannot be converted to type float without overflow: (0.00655336,-0.00

pytorch error: RuntimeError: value cannot be converted to type float without overflow: (0.00655336,-0.00…

Solution:
initialize network layers such as conv2d.

# Default Method
for m in model.modules():
    if isinstance(m, (nn.Conv2d, nn.Linear)):
        nn.init.xavier_uniform_(m.weight)

Read More: