I want to define an activation function for my model. The activation function I want to use is the sigmoid function.
I define this activation function.
import torch
def sigmoid(z):
return 1/(1+torch.exp(-z))
X = np.array([0])
t = torch.from_numpy(X)
sigmoid(t)
RuntimeError: exp_vml_cpu not implemented for ‘Long’
But when use X = np.array([0.]) I don’t get any error. Why that occurs?