I guess, yes. My torch version is 0.3.0.post4.
Well. I use this function to customize a layer Hadamard as
class Hadamard(nn.Module):
  def __init__(self, in_channels, in_height, in_width, bias=True):
	super(Hadamard, self).__init__()
	
	self.in_channels = in_channels
	self.in_height = in_height
	self.in_width = in_width
	self.weight = nn.Parameter(torch.Tensor(in_channels, in_height, in_width))
	if bias:
		self.bias = nn.Parameter(torch.Tensor(in_channels, in_height, in_width))
	else:
		self.register_parameter('bias', None)
	self.reset_parameters()

 def reset_parameters(self):
	stdv = 0.05
	for weight in self.parameters():
		 weight.data.uniform_(-stdv, stdv);

 def forward(self, input):
    return HadamardProd()(input, self.weight, self.bias)

And I utility this layer in my network. The forward propagation goes well but the backward crashes with above error.