parameters: (op_type, inputs, outputs, attrs)
return_statement: return op_desc
docstring: Create a C++ OpDesc object with specified inputs, outputs and attributes.
docstring_summary: Create a C++ OpDesc object with specified inputs, outputs and attributes.
docstring_tokens: Create a C ++ OpDesc object with specified inputs outputs and attributes .
function: def _create_op_desc_(op_type, inputs, outputs, attrs):
      """
      Create a C++ OpDesc object with specified inputs, outputs and attributes.
      """
      op_desc = core.OpDesc()
      op_desc.set_type(op_type)
      for para, args in six.iteritems(inputs):
          op_desc.set_input(
              para,
              list(
                  map(lambda arg: arg.decode() if isinstance(arg, six.binary_type) else arg,
                      args)))
      for para, args in six.iteritems(outputs):
          op_desc.set_output(
              para,
              list(
                  map(lambda arg: arg.decode() if isinstance(arg, six.binary_type) else arg,
                      args)))
  
      op_role_attr_name = core.op_proto_and_checker_maker.kOpRoleAttrName()
      op_device_attr_name = core.op_proto_and_checker_maker.kOpDeviceAttrName()
  
      if op_role_attr_name not in attrs:
          attrs[
              op_role_attr_name] = core.op_proto_and_checker_maker.OpRole.Backward
      if op_device_attr_name not in attrs:
          attrs[op_device_attr_name] = ""
      for name, val in six.iteritems(attrs):
          if isinstance(val, framework.Block):
              op_desc.set_block_attr(name, val.desc)
          else:
              op_desc._set_attr(name, val)
      return op_desc
function_tokens: def _create_op_desc_ ( op_type , inputs , outputs , attrs ) : op_desc = core . OpDesc ( ) op_desc . set_type ( op_type ) for para , args in six . iteritems ( inputs ) : op_desc . set_input ( para , list ( map ( lambda arg : arg . decode ( ) if isinstance ( arg , six . binary_type ) else arg , args ) ) ) for para , args in six . iteritems ( outputs ) : op_desc . set_output ( para , list ( map ( lambda arg : arg . decode ( ) if isinstance ( arg , six . binary_type ) else arg , args ) ) ) op_role_attr_name = core . op_proto_and_checker_maker . kOpRoleAttrName ( ) op_device_attr_name = core . op_proto_and_checker_maker . kOpDeviceAttrName ( ) if op_role_attr_name not in attrs : attrs [ op_role_attr_name ] = core . op_proto_and_checker_maker . OpRole . Backward if op_device_attr_name not in attrs : attrs [ op_device_attr_name ] = "" for name , val in six . iteritems ( attrs ) : if isinstance ( val , framework . Block ) : op_desc . set_block_attr ( name , val . desc ) else : op_desc . _set_attr ( name , val ) return op_desc