# Path: deeppy/base.py
# class PickleMixin(object):
#     _pickle_ignore = ['_tmp_']
# 
#     def _pickle_discard(self, attr_name):
#         for s in self._pickle_ignore:
#             if attr_name.startswith(s):
#                 return True
#         return False
# 
#     def __getstate__(self):
#         return dict((k, None) if self._pickle_discard(k) else (k, v)
#                     for k, v in self.__dict__.items())


import numpy as np
import cudarray as ca
from .base import PickleMixin


_FLT_MIN = np.finfo(ca.float_).tiny


class Loss(PickleMixin):
    @classmethod
    def from_any(cls, arg):
        if isinstance(arg, Loss):

# Path: deeppy/base.py
# class PickleMixin(object):
#     _pickle_ignore = ['_tmp_']
# 
#     def _pickle_discard(self, attr_name):
#         for s in self._pickle_ignore:
#             if attr_name.startswith(s):
#                 return True
#         return False
# 
#     def __getstate__(self):
#         return dict((k, None) if self._pickle_discard(k) else (k, v)
#                     for k, v in self.__dict__.items())


# Path: deeppy/loss.py
import numpy as np
import cudarray as ca
from .base import PickleMixin



_FLT_MIN = np.finfo(ca.float_).tiny


class Loss(PickleMixin):
    @classmethod
    def from_any(cls, arg):
        if isinstance(arg, Loss):

            return arg