Your forward() function does not return anything, whereas you invoke it as logs = self.forward(samples). Could you say how/why this works?
Also, the indentation is not right, but I guess that is unintentional?