      if get_backend() == "amd":
          assert K.eval(objective_output).shape == output_shape
      else:
          output = objective_output.numpy()
          assert output.dtype == "float32" and not np.isnan(output)
  
  
  _LWPARAMS = [losses.GeneralizedLoss(), losses.GradientLoss(), losses.GMSDLoss(),
               losses.LInfNorm(), k_losses.mean_absolute_error, k_losses.mean_squared_error,
               k_losses.logcosh, losses.DSSIMObjective(), losses.MSSSIMLoss()]
 
</s> remove         assert output.dtype == "float32" and not np.isnan(output)
 </s> add         assert output.dtype == "float32" and not np.any(np.isnan(output)) </s> remove         for mod in _get_all_sub_models(model):
 </s> add         for mod in get_all_sub_models(model): </s> remove from ._base import KerasModel, ModelBase, logger, _get_all_sub_models
 </s> add from ._base import KerasModel, ModelBase, get_all_sub_models

logger = logging.getLogger(__name__)  # pylint: disable=invalid-name

        assert output.dtype == "float32" and not np.any(np.isnan(output))
      if get_backend() == "amd":
          assert K.eval(objective_output).shape == output_shape
      else:
          output = objective_output.numpy()
        assert output.dtype == "float32" and not np.any(np.isnan(output))
  
  
  _LWPARAMS = [losses.GeneralizedLoss(), losses.GradientLoss(), losses.GMSDLoss(),
               losses.LInfNorm(), k_losses.mean_absolute_error, k_losses.mean_squared_error,
               k_losses.logcosh, losses.DSSIMObjective(), losses.MSSSIMLoss()]
keep keep keep keep replace keep keep keep keep keep
 Refactoring and TravisCI to Github Actions (#1239)

* refactor training

* travis to actions 
tests/lib/model/losses_test.py