if operator_code_idx in used_operators_dic:
operator_code = sample_model.OperatorCodes(operator_code_idx)
operator_code_string = operator_code.CustomCode()
- if (operator_code_string !=
- "") and (not operator_code_string in new_operator_code_string_list):
+ if operator_code_string and (operator_code_string != "") and (
+ not operator_code_string in new_operator_code_string_list):
new_operator_code_string_list[
operator_code_string] = new_builder.CreateString(operator_code_string)
# Name
subgraph_name = selected_subgraph.Name()
have_name = False
- if subgraph_name != "":
+ if subgraph_name and subgraph_name != "":
have_name = True
new_subgraph_name = new_builder.CreateString(subgraph_name)