I added an IScaleLayer using the api of the network for the purpose of squaring. But I found that when there is a negative number in the input, the corresponding result is nan. Is this a bug?
What version of TensorRT are you using, and what GPU hardware?
TensorRT version: 5.0.0.10
GPU: V100
This is my code:
x1 = network.add_input(“x1”,trt.float32, (10,10,10))
layer1 = network.add_scale(x1, trt.ScaleMode.UNIFORM, np.array([0],dtype=np.float32), np.array([1],dtype=np.float32), np.array([2], dtype=np.float32))
x2 = layer1.get_output(0)
network.mark_output(x2)
The results of positive number are correct, but the negative are nan
Hello,
We’d expect this to be fixed in latest version of TRT 5.0.2+. Please try it with the latest version and let us know if it addresses the issue.
regards,
NVES
Thank you. It works!
Now the results are correct.