def backward(ctx, grad_h, grad_cell): outputs = lltm_cpp.backward( grad_h.contiguous(), grad_cell.contiguous(), *ctx.saved_variables) d_old_h, d_input, d_weights, d_bias, d_old_cell = outputs return d_input, d_weights, d_bias, d_old_h, d_old_cell
def backward(ctx, grad_h, grad_cell): d_old_h, d_input, d_weights, d_bias, d_old_cell = lltm_cpp.backward( grad_h, grad_cell, *ctx.saved_variables) return d_input, d_weights, d_bias, d_old_h, d_old_cell
def backward(ctx, grad_out): d_input = lltm_cpp.backward(grad_out.contiguous(), *ctx.saved_variables, filename, function) return d_input[0]