Hi,
This writing Tensors inplace can be problematic.
If you can use lists instead, it will solve the problem.
Otherwise, you need to avoid problematic inplace operations either by creating new Tensors every time or  adding a clone() of fw_x/fw_h after all your inplace ops.