Browse Source

single op parser add check for json input

pull/580/head
wxl 4 years ago
parent
commit
bcdf55c0fe
2 changed files with 3 additions and 2 deletions
  1. +1
    -1
      ge/offline/single_op_parser.cc
  2. +2
    -1
      ge/offline/single_op_parser.h

+ 1
- 1
ge/offline/single_op_parser.cc View File

@@ -210,7 +210,7 @@ void from_json(const Json &j, SingleOpTensorDesc &desc) {
desc.dynamic_input_name = dynamic_input_name->get<string>();
}
if (!is_tensor_valid) {
ge::AttrUtils::SetBool(desc, kSingleOpTensorDescValid, is_tensor_valid);
ge::AttrUtils::SetBool(&desc, kSingleOpTensorDescValid, is_tensor_valid);
}
}



+ 2
- 1
ge/offline/single_op_parser.h View File

@@ -23,11 +23,12 @@

#include "ge/ge_api_error_codes.h"
#include "graph/types.h"
#include "graph/detail/attributes_holder.h"
#include "graph/ge_attr_value.h"
#include "graph/op_desc.h"

namespace ge {
struct SingleOpTensorDesc {
struct SingleOpTensorDesc: public AttrHolder {
std::string name;
std::vector<int64_t> dims;
std::vector<int64_t> ori_dims;


Loading…
Cancel
Save