If you want to register this tensor inside the module, so that it would also be added to the state_dict, but would remain constant, you could register it as a buffer via:
m.register_buffer('threshold', torch.tensor([1.]))