Problem is when I do as you tell me I get the following error :
 lf.A, self.KL_variable = ICA_3D_MM.apply(self.mu, self.sigma, self.landa, eps, self.dimX, self.dimY, self.dimZ)
RuntimeError: save_for_backward can only save input or output tensors, but argument 3 doesn't satisfy this condition 

The only trick I found was to put .data to avoid this.