Oh I found out it was only available on master  21 days ago, Is it still the case ?

EDIT :
I installed from source and I have the grad function now.
But the following error :

> Traceback (most recent call last):
>   File "grad_cam.py", line 96, in <module>
>     Gradinput = torch.autograd.grad(logit,Variable(model1_output),doutput)
>   File "/home/lelouedec/anaconda2/lib/python2.7/site-packages/torch/autograd/__init__.py", line 153, in grad
>     inputs, only_inputs)
> RuntimeError: One of the differentiated Variables appears to not have been used in the graph

What I want to achieve is the following piece of code from lua:
model2:zeroGradParameters()
model2:backward(model1.output, doutput)
– Get the activations from model1 and and gradients from model2
local activations = model1.output:squeeze()
local gradients = model2.gradInput:squeeze()
Where model 1 is the first half of alexnet and model 2 the other half