Thanks, clamp works for ReLU but not for prime ReLU,
output = input.clamp(max=1) doesn’t work since most entries are between 0 and 1.
torch.where works fine but all these are still slow compared to output=numpy.maximum(input,0) by a wide margin.
I tried searching the official documentation for ReLU but the actual implementation seems to be in lua which I couldn’t understand. Also, does pytorch has an implementation for ReLU prime or is it computed internally in the autograd