Support one input case for Min/Max to pass ONNX backend tests.
This commit is contained in:
Родитель
dca867c2cb
Коммит
9ce967aa46
|
@ -2353,12 +2353,14 @@ FunctionPtr ONNXToCNTKHelper::CreateFunction(const Node *node, const std::vector
|
||||||
}
|
}
|
||||||
else if (onnxOpName == "Max")
|
else if (onnxOpName == "Max")
|
||||||
{
|
{
|
||||||
FunctionPtr cntkFunction = ElementMax(inputs[0], inputs[1], ToFixedWStringFromMultiByte(node->Name()));
|
// TODO: Support more than 2 inputs.
|
||||||
|
FunctionPtr cntkFunction = ElementMax(inputs[0], inputs.size() > 1 ? inputs[1] : inputs[0], ToFixedWStringFromMultiByte(node->Name()));
|
||||||
return cntkFunction;
|
return cntkFunction;
|
||||||
}
|
}
|
||||||
else if (onnxOpName == "Min")
|
else if (onnxOpName == "Min")
|
||||||
{
|
{
|
||||||
FunctionPtr cntkFunction = ElementMin(inputs[0], inputs[1], ToFixedWStringFromMultiByte(node->Name()));
|
// TODO: Support more than 2 inputs.
|
||||||
|
FunctionPtr cntkFunction = ElementMin(inputs[0], inputs.size() > 1 ? inputs[1] : inputs[0], ToFixedWStringFromMultiByte(node->Name()));
|
||||||
return cntkFunction;
|
return cntkFunction;
|
||||||
}
|
}
|
||||||
else if (onnxOpName == "Sum")
|
else if (onnxOpName == "Sum")
|
||||||
|
|
|
@ -35,10 +35,6 @@ skip_models = [
|
||||||
|
|
||||||
skip_ops = [
|
skip_ops = [
|
||||||
# These tests crash and prevent tests after them from running.
|
# These tests crash and prevent tests after them from running.
|
||||||
'test_max_one_input_cpu',
|
|
||||||
'test_max_one_input_cuda',
|
|
||||||
'test_min_one_input_cpu',
|
|
||||||
'test_min_one_input_cuda',
|
|
||||||
'test_reshape_extended_dims_cpu',
|
'test_reshape_extended_dims_cpu',
|
||||||
'test_reshape_extended_dims_cuda',
|
'test_reshape_extended_dims_cuda',
|
||||||
'test_reshape_negative_dim_cpu',
|
'test_reshape_negative_dim_cpu',
|
||||||
|
|
Загрузка…
Ссылка в новой задаче