• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1syntax = "proto3";
2
3package tensorflow;
4option cc_enable_arenas = true;
5option java_outer_classname = "TypesProtos";
6option java_multiple_files = true;
7option java_package = "org.tensorflow.framework";
8option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/framework/types_go_proto";
9
10// (== suppress_warning documentation-presence ==)
11// LINT.IfChange
12enum DataType {
13  // Not a legal value for DataType.  Used to indicate a DataType field
14  // has not been set.
15  DT_INVALID = 0;
16
17  // Data types that all computation devices are expected to be
18  // capable to support.
19  DT_FLOAT = 1;
20  DT_DOUBLE = 2;
21  DT_INT32 = 3;
22  DT_UINT8 = 4;
23  DT_INT16 = 5;
24  DT_INT8 = 6;
25  DT_STRING = 7;
26  DT_COMPLEX64 = 8;  // Single-precision complex
27  DT_INT64 = 9;
28  DT_BOOL = 10;
29  DT_QINT8 = 11;     // Quantized int8
30  DT_QUINT8 = 12;    // Quantized uint8
31  DT_QINT32 = 13;    // Quantized int32
32  DT_BFLOAT16 = 14;  // Float32 truncated to 16 bits.  Only for cast ops.
33  DT_QINT16 = 15;    // Quantized int16
34  DT_QUINT16 = 16;   // Quantized uint16
35  DT_UINT16 = 17;
36  DT_COMPLEX128 = 18;  // Double-precision complex
37  DT_HALF = 19;
38  DT_RESOURCE = 20;
39  DT_VARIANT = 21;  // Arbitrary C++ data types
40  DT_UINT32 = 22;
41  DT_UINT64 = 23;
42
43  // Do not use!  These are only for parameters.  Every enum above
44  // should have a corresponding value below (verified by types_test).
45  DT_FLOAT_REF = 101;
46  DT_DOUBLE_REF = 102;
47  DT_INT32_REF = 103;
48  DT_UINT8_REF = 104;
49  DT_INT16_REF = 105;
50  DT_INT8_REF = 106;
51  DT_STRING_REF = 107;
52  DT_COMPLEX64_REF = 108;
53  DT_INT64_REF = 109;
54  DT_BOOL_REF = 110;
55  DT_QINT8_REF = 111;
56  DT_QUINT8_REF = 112;
57  DT_QINT32_REF = 113;
58  DT_BFLOAT16_REF = 114;
59  DT_QINT16_REF = 115;
60  DT_QUINT16_REF = 116;
61  DT_UINT16_REF = 117;
62  DT_COMPLEX128_REF = 118;
63  DT_HALF_REF = 119;
64  DT_RESOURCE_REF = 120;
65  DT_VARIANT_REF = 121;
66  DT_UINT32_REF = 122;
67  DT_UINT64_REF = 123;
68}
69// LINT.ThenChange(
70//    https://www.tensorflow.org/code/tensorflow/c/tf_datatype.h,
71//    https://www.tensorflow.org/code/tensorflow/go/tensor.go,
72//    https://www.tensorflow.org/code/tensorflow/core/framework/tensor.cc,
73//    https://www.tensorflow.org/code/tensorflow/core/framework/types.h,
74//    https://www.tensorflow.org/code/tensorflow/core/framework/types.cc,
75//    https://www.tensorflow.org/code/tensorflow/python/framework/dtypes.py,
76//    https://www.tensorflow.org/code/tensorflow/python/framework/function.py)
77
78// For identifying the underlying type of a variant. For variants, the types
79// listed here are a subset of the types in the variant type registry,
80// corresponding to commonly used variants which must occasionally be
81// special-cased.
82enum SpecializedType {
83  // Invalid/unknown specialized type.
84  ST_INVALID = 0;
85  // "tensorflow::TensorList" in the variant type registry.
86  ST_TENSOR_LIST = 1;
87  // "tensorflow::data::Optional" in the variant type registry.
88  ST_OPTIONAL = 2;
89}
90