support equal list with none

This commit is contained in:
buxue 2020-04-18 10:03:26 +08:00
parent 9e1b5efd1d
commit c853f985cc
2 changed files with 32 additions and 1 deletions

View File

@ -743,7 +743,7 @@ FuncGraphPtr MultitypeFuncGraph::GenerateFromTypes(const TypePtrList& types) {
}
oss << ++idx << ". " << item.first << "\n " << trace::GetDebugInfo(func_graph->debug_info()) << "\n";
}
MS_LOG(EXCEPTION) << "Fail to find overload function for `" << name_ << "` with type " << buffer.str() << "\n"
MS_LOG(EXCEPTION) << "The '" << name_ << "' operation does not support the type " << buffer.str() << "\n"
<< oss.str();
}

View File

@ -190,6 +190,7 @@ def _none_equal_tuple(x, y):
"""
return False
@equal.register("Tensor", "Number")
@equal.register("Number", "Tensor")
@equal.register("Tensor", "Tensor")
@ -235,3 +236,33 @@ def _none_equal_tensor(x, y):
bool, return false.
"""
return False
@equal.register("List", "None")
def _list_equal_none(x, y):
"""
Determine if list equal none.
Args:
x (list): The first input which is a list.
y (none): The second input which is none.
Returns:
bool, return false.
"""
return False
@equal.register("None", "List")
def _none_equal_list(x, y):
"""
Determine if none equal list.
Args:
x (none): The first input which is none.
y (list): The second input which is a list.
Returns:
bool, return false.
"""
return False