True! As far as the error check goes, since it appears only LBFGS require contiguous tensors, a good place to check for contiguous trainable tensors is within the LBFGS class’ init function since it anyway receives all the trainable tensors (or parameters) as input.