forked from mindspore-Ecosystem/mindspore
!1448 Fix input check in graphdata
Merge pull request !1448 from heleiwang/fix_input_check
This commit is contained in:
commit
e652736304
|
@ -152,6 +152,7 @@ Status Graph::GetNodeFeature(const std::shared_ptr<Tensor> &nodes, const std::ve
|
|||
if (!nodes || nodes->Size() == 0) {
|
||||
RETURN_STATUS_UNEXPECTED("Input nodes is empty");
|
||||
}
|
||||
CHECK_FAIL_RETURN_UNEXPECTED(!feature_types.empty(), "Inpude feature_types is empty");
|
||||
TensorRow tensors;
|
||||
for (auto f_type : feature_types) {
|
||||
std::shared_ptr<Feature> default_feature;
|
||||
|
|
|
@ -1153,6 +1153,9 @@ def check_aligned_list(param, param_name, membor_type):
|
|||
|
||||
if not isinstance(param, list):
|
||||
raise TypeError("Parameter {0} is not a list".format(param_name))
|
||||
if not param:
|
||||
raise TypeError(
|
||||
"Parameter {0} or its members are empty".format(param_name))
|
||||
membor_have_list = None
|
||||
list_len = None
|
||||
for membor in param:
|
||||
|
|
Loading…
Reference in New Issue