Error about multiply with different precision

Today I met an error:

a is a float32 pytorch tensor; and b is a float64 pytorch tensor with all elements equals 1. When I perform the following multiplication:

The result of “c” is 0.

The error will be fixed when b is converted to float32.

One thought on “Error about multiply with different precision”

Leave a Reply

Your email address will not be published. Required fields are marked *