def loss_fun(mock, target, **kwargs): m = mock.copy() m.name = 'mse_loss_' + m.name return m
def max_stub(mock, dim, keepdim): m = mock.copy() m.name += '_max' return m
def bce_loss_stub(mock, target, **kwargs): m = mock.copy() m.name = 'bce_loss_' + m.name return m
def softmax_stub(mock, dim): m = mock.copy() m.name = mock.name + '_softmax' return m