80e1d0aba201d45ba32542327ab1a63e074a759e,tests/end2end/test_single_operator_with_cntk_backend.py,TestKeras2CoreML2ONNX,test_activation_2d,#TestKeras2CoreML2ONNX#,187

Before Change


            if isinstance(activation, str):
                model.add(Activation(activation, input_shape=(3,)))
            else:
                model.add(activation(input_shape=(3,)))
            model.compile(optimizer="adagrad", loss="mse")

            self._test_one_to_one_operator_core(model, x)

After Change


        x = _create_tensor(N, C)

        for activation in activation_to_be_tested:
            input = Input(shape=(C,))
            if isinstance(activation, str):
                result = Activation(activation)(input)
            else:
                result = activation()(input)
            model = Model(input=input, output=result)
            model.compile(optimizer="adagrad", loss="mse")

            self._test_one_to_one_operator_core(model, x)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: onnx/onnxmltools
Commit Name: 80e1d0aba201d45ba32542327ab1a63e074a759e
Time: 2018-05-11
Author: wschin@outlook.com
File Name: tests/end2end/test_single_operator_with_cntk_backend.py
Class Name: TestKeras2CoreML2ONNX
Method Name: test_activation_2d


Project Name: onnx/onnxmltools
Commit Name: 80e1d0aba201d45ba32542327ab1a63e074a759e
Time: 2018-05-11
Author: wschin@outlook.com
File Name: tests/end2end/test_single_operator_with_cntk_backend.py
Class Name: TestKeras2CoreML2ONNX
Method Name: test_activation_4d


Project Name: keras-team/keras
Commit Name: 47ed18a3af8be20dce91286a331d4671074ee0ca
Time: 2015-11-26
Author: francois.chollet@gmail.com
File Name: keras/layers/core.py
Class Name: TimeDistributedDense
Method Name: get_output