

def compare_tensors(func, param_list, param2, tol=0.0, epoch=1):
    func.optimize([DummyLayer(param)], epoch=epoch)
    ((param, grad), states) = param_list[0]
    cond = np.sum((np.abs((param.get() - param2)) <= tol))
    assert (cond == np.prod(param2.shape))

dataset/ETHPy150Open NervanaSystems/neon/tests/test_optimizer.py compare_tensors/VarMisuse@29/35 `param_list`->`param`