コード例 #1
0
ファイル: c_api_util.py プロジェクト: ncnnnnn/oneflow
def GetOpAttributes():
    op_attributes, error_str = oneflow_internal.GetSerializedOpAttributes()
    error = text_format.Parse(error_str, error_util.ErrorProto())
    if error.HasField("error_type"):
        raise JobBuildAndInferError(error)
    return text_format.Parse(op_attributes, op_attribute_pb.OpAttributeList())
コード例 #2
0
ファイル: c_api_util.py プロジェクト: liudyboy/oneflow
def GetOpAttributes():
    op_attributes = oneflow_api.GetSerializedOpAttributes()
    return text_format.Parse(op_attributes, op_attribute_pb.OpAttributeList())
コード例 #3
0
def GetInterfaceOpAttributes():
    op_attributes = oneflow._oneflow_internal.GetSerializedInterfaceOpAttributes(
    )
    return text_format.Parse(op_attributes, op_attribute_pb.OpAttributeList())
コード例 #4
0
def GetOpAttributes():
    op_attributes, error = oneflow_api.GetSerializedOpAttributes()
    if error.has_error_type():
        raise JobBuildAndInferCfgError(error)
    return text_format.Parse(op_attributes, op_attribute_pb.OpAttributeList())