Hi @caonv, thank you for your reply.
I have a doubt. torch.sigmoid ranges between (0, 1) and the operation torch.sigmoid(self.weight) - 0.9 brings the range to (-0.9, 0.1). When relu is introduced, the range is now (0, 0.1). The threshold on 0 side is perfectly fine, but what about the threshold on 1? Am I missing something?