brevitas icon indicating copy to clipboard operation
brevitas copied to clipboard

softmax

Open ardeal opened this issue 2 years ago • 3 comments

Hi,

Is softmax supported? how to use it in my python code? Is there any document about sofmax in Brevitas?

ardeal avatar Jun 24 '22 09:06 ardeal

AKAIK there is no quantized softmax layer but you can use it from torch it's just a mathematical layer.

MohamedA95 avatar Jun 24 '22 10:06 MohamedA95

@MohamedA95 , Thank you! To use torch.nn.Softmax() in code is not difficult, my question is: the output of the upper layer(qnn.QuantLinear) is quantized data, could it be passed to torch.nn.Softmax() directly?

ardeal avatar Jun 24 '22 10:06 ardeal

Hi @ardeal yes it could be passed directly.

MohamedA95 avatar Jun 25 '22 13:06 MohamedA95