How I can use a tensor in torch.nn.threshold

I am wondering if I can use a tensor in the threshold function.
I read this which kinda post the same question in the past but it is confusing.
The torch.nn.functional.threshold(input, threshold, value, inplace=False) take input and a threshold.
if i use threshold = torch.tensor(1.) it shoots an error. but i wanna use tensor so i can keep the gradient for back-propagation.
Does anyone have any suggestion?