# Path: deeppy/base.py
# class ParamMixin(object):
#     @property
#     def params(self):
#         """ List of Parameter objects. """
#         raise NotImplementedError()
# 
#     @params.setter
#     def params(self, params):
#         raise NotImplementedError()


import itertools
import numpy as np
import cudarray as ca
import deeppy as dp
from copy import copy
from deeppy.base import ParamMixin


batch_sizes = [1, 4, 5, 10, 24]
n_ins = [1, 2, 8, 7, 25]
n_outs = [1, 2, 8, 7, 25]


def allclose(a, b, rtol=None, atol=None):
    if ca.float_ == np.float32:
        rtol = 1e-04 if rtol is None else rtol
        atol = 1e-06 if atol is None else atol
    else:
        rtol = 1e-05 if rtol is None else rtol
        atol = 1e-08 if atol is None else atol
    return np.allclose(a, b, rtol, atol)


def gradclose(a, b, rtol=None, atol=None):
    if ca.float_ == np.float32:
        rtol = 1e-05 if rtol is None else rtol
        atol = 1e-07 if atol is None else atol
    else:
        rtol = 1e-05 if rtol is None else rtol

# Path: deeppy/base.py
# class ParamMixin(object):
#     @property
#     def params(self):
#         """ List of Parameter objects. """
#         raise NotImplementedError()
# 
#     @params.setter
#     def params(self, params):
#         raise NotImplementedError()


# Path: test/unit/feedforward/test_layers.py
import itertools
import numpy as np
import cudarray as ca
import deeppy as dp
from copy import copy
from deeppy.base import ParamMixin



batch_sizes = [1, 4, 5, 10, 24]
n_ins = [1, 2, 8, 7, 25]
n_outs = [1, 2, 8, 7, 25]


def allclose(a, b, rtol=None, atol=None):
    if ca.float_ == np.float32:
        rtol = 1e-04 if rtol is None else rtol
        atol = 1e-06 if atol is None else atol
    else:
        rtol = 1e-05 if rtol is None else rtol
        atol = 1e-08 if atol is None else atol
    return np.allclose(a, b, rtol, atol)


def gradclose(a, b, rtol=None, atol=None):
    if ca.float_ == np.float32:
        rtol = 1e-05 if rtol is None else rtol
        atol = 1e-07 if atol is None else atol
    else:
        rtol = 1e-05 if rtol is None else rtol

        atol = 1e-08 if atol is None else atol