Hello,
I want to make inference at 16 bit precision (both for model parameters and input data). For example, I wish to convert numbers such as 1.123456789 to number with lower precision (1.123300000 for example)
I wanted to ask if the following approach is correct for reducing the linear weights in a model to 16 bit:
    for layer in net_copy.modules():
        if type(layer) == nn.Linear:
            layer.weight = nn.Parameter(layer.weight.half().float())

Pytorch won’t work with half precision weights so I converted to half and back to float again. When I print the weights it’s hard for me to determine if this approach is behaving as I want it to, plus the performance of the network is identical before and after this transformation.