5f41a2bd185b946de113714910e1f5f2730d5f4b,onnxmltools/convert/sklearn/shape_calculators/SVM.py,,calculate_sklearn_svm_output_shapes,#Any#,14

Before Change


    if operator.type in ["SklearnSVC"]:
        check_input_and_output_numbers(operator, input_count_range=[1, None], output_count_range=[1, 2])

        if N != 1 and N != "None":
            // In this case, output probability map should be a sequence of dictionaries, which is not implemented yet.
            raise RuntimeError("Currently batch size must be one")
        if len(operator.outputs) != 2:
            raise RuntimeError("Support vector classifier has two outputs")
        if all(isinstance(i, (six.string_types, six.text_type)) for i in op.classes_):
            operator.outputs[0].type = StringTensorType([1, 1])
            operator.outputs[1].type = DictionaryType(StringTensorType([1]), FloatTensorType([1]))
        elif all(isinstance(i, (numbers.Real, bool, np.bool_)) for i in op.classes_):

After Change


                else:
                    // New ONNX ZipMap produces Seq<Map> type
                    operator.outputs[1].type = \
                        SequenceType(DictionaryType(Int64TensorType([1]), FloatTensorType([1])), N)
        else:
            raise RuntimeError("Class labels should be either all strings or all integers")
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: onnx/onnxmltools
Commit Name: 5f41a2bd185b946de113714910e1f5f2730d5f4b
Time: 2018-05-19
Author: wschin@outlook.com
File Name: onnxmltools/convert/sklearn/shape_calculators/SVM.py
Class Name:
Method Name: calculate_sklearn_svm_output_shapes


Project Name: kundajelab/dragonn
Commit Name: 9c158b87f5fb2dca1ed95884e667ab2fc218e1b7
Time: 2017-05-01
Author: jisraeli@stanford.edu
File Name: dragonn/models.py
Class Name: SequenceDNN
Method Name: deeplift


Project Name: BYU-PCCL/holodeck
Commit Name: bbe895d707552dcf467aea2f67cca53a738222ed
Time: 2018-01-06
Author: joshua.greaves@gmail.com
File Name: Holodeck/Agents.py
Class Name: DiscreteSphereAgent
Method Name: __act__