I have a 3 class classifier which i have parsed in tensor rt. The tensorrt model runs correctly but the output is incorrect. It seems the classes seem to take a value of either 0 or 1. The output from the final softmax layer is as shown.

Class_name Probability

class_1 1.0

class_2 0.0

class_3 0.0

There are no intermediate values and the probabilities are either 0 or 1.

On further checking of the final fully connected layer before the probability layer, the following values are obtained.

Class_name value in fully_connected layer

class_1 -644.469116

class_2 -1031.442505

class_3 -866.672424

It would be great if someone can give me an idea of why the probability layer is behaving in such an odd manner. Does it have something to do with the negative values in the fully connected layers? Is there a fix for the issue?

Thanks in advance