def template():
    template_test_unary_operator(LocalResponseNormalization, {
        "n": 1,
        "k": 2,
        "alpha": 0.1,
        "beta": 0.2
    },
                                 test1d=False,
                                 test2d=False,
                                 test3d=False,
                                 test4d=True,
                                 axes=[Axis.N, Axis.H, Axis.W, Axis.C])
Esempio n. 2
0
def template(ksize=3, stride=1, pad=1, height=2, width=3, expected_dict=None):
    template_test_unary_operator(
        AveragePooling2D, {
            "ksize": ksize,
            "stride": stride,
            "padding": pad
        },
        test1d=False,
        test2d=False,
        test3d=False,
        test4d=True,
        axes=[Axis.N, Axis.H, Axis.W, Axis.C],
        shape_dict=AxisKeyDict([Axis.N, Axis.H, Axis.W, Axis.C],
                               [2, height, width, 4]),
        expected_dict=expected_dict)
Esempio n. 3
0
def template(ksize=3, stride=1, pad=1, height=2, width=3, expected_dict=None):
    template_test_unary_operator(MaxPooling2D, {
        "ksize": ksize,
        "stride": stride,
        "padding": pad
    },
                                 test1d=False,
                                 test2d=False,
                                 test3d=False,
                                 test4d=True,
                                 axes=[Axis.N, Axis.H, Axis.W, Axis.C],
                                 shape_dict={
                                     Axis.N: 2,
                                     Axis.H: height,
                                     Axis.W: width,
                                     Axis.C: 4
                                 },
                                 expected_dict=expected_dict)
Esempio n. 4
0
def template():
    template_test_unary_operator(Softmax, {"axis": Axis.C},
                                 test1d=False,
                                 test2d=True,
                                 test3d=False,
                                 test4d=False,
                                 axes=[Axis.N, Axis.C])
    template_test_unary_operator(Softmax, {"axis": Axis.C},
                                 test1d=False,
                                 test2d=False,
                                 test3d=True,
                                 test4d=False,
                                 axes=[Axis.N, Axis.C, Axis.T])
    template_test_unary_operator(Softmax, {"axis": Axis.C},
                                 test1d=False,
                                 test2d=False,
                                 test3d=False,
                                 test4d=True,
                                 axes=[Axis.N, Axis.C, Axis.H, Axis.W])
Esempio n. 5
0
def template():
    template_test_unary_operator(Elu)
Esempio n. 6
0
def template():
    template_test_unary_operator(Sigmoid)
Esempio n. 7
0
def template():
    template_test_unary_operator(Tanh)
Esempio n. 8
0
def template():
    template_test_unary_operator(ScalarPow, {"value": 2})
Esempio n. 9
0
def template():
    template_test_unary_operator(ScalarAffine, {"scale": 2.0, "bias": 3.0})
Esempio n. 10
0
def template():
    template_test_unary_operator(LeakyRelu, {"slope": 0.3})
Esempio n. 11
0
def template():
    template_test_unary_operator(Softsign)
Esempio n. 12
0
def template():
    template_test_unary_operator(ClippedRelu, {"cap": 10.0})
Esempio n. 13
0
def template():
    template_test_unary_operator(Softplus, {"beta": 1.0})