Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: onnx.proto
package onnx;
public final class Onnx {
private Onnx() {}
public static void registerAllExtensions(
org.nd4j.shade.protobuf.ExtensionRegistryLite registry) {
}
public static void registerAllExtensions(
org.nd4j.shade.protobuf.ExtensionRegistry registry) {
registerAllExtensions(
(org.nd4j.shade.protobuf.ExtensionRegistryLite) registry);
}
/**
*
* To be compatible with both proto2 and proto3, we will use a version number
* that is not defined by the default value but an explicit enum number.
*
*
* Protobuf enum {@code onnx.Version}
*/
public enum Version
implements org.nd4j.shade.protobuf.ProtocolMessageEnum {
/**
*
* proto3 requires the first enum value to be zero.
* We add this just to appease the compiler.
*
* The version field is always serialized and we will use it to store the
* version that the graph is generated from. This helps us set up version
* control. We should use version as
* xx(major) - xx(minor) - xxxx(bugfix)
* and we are starting with 0x00000001 (0.0.1), which was the
* version we published on Oct 10, 2017.
*
* IR VERSION 0.0.3 published on Nov 3, 2017
* - For operator versioning:
* - Added new message OperatorSetIdProto
* - Added opset_import in ModelProto
* - For vendor extensions, added domain in NodeProto
*
* proto3 requires the first enum value to be zero.
* We add this just to appease the compiler.
*
*
* _START_VERSION = 0;
*/
public static final int _START_VERSION_VALUE = 0;
/**
*
* The version field is always serialized and we will use it to store the
* version that the graph is generated from. This helps us set up version
* control. We should use version as
* xx(major) - xx(minor) - xxxx(bugfix)
* and we are starting with 0x00000001 (0.0.1), which was the
* version we published on Oct 10, 2017.
*
*
* IR_VERSION_2017_10_10 = 1;
*/
public static final int IR_VERSION_2017_10_10_VALUE = 1;
/**
*
* IR_VERSION 0.0.2 published on Oct 30, 2017
* - Added type discriminator to AttributeProto to support proto3 users
*
*
* IR_VERSION_2017_10_30 = 2;
*/
public static final int IR_VERSION_2017_10_30_VALUE = 2;
/**
*
* IR VERSION 0.0.3 published on Nov 3, 2017
* - For operator versioning:
* - Added new message OperatorSetIdProto
* - Added opset_import in ModelProto
* - For vendor extensions, added domain in NodeProto
*
*
* IR_VERSION = 3;
*/
public static final int IR_VERSION_VALUE = 3;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static Version valueOf(int value) {
return forNumber(value);
}
public static Version forNumber(int value) {
switch (value) {
case 0: return _START_VERSION;
case 1: return IR_VERSION_2017_10_10;
case 2: return IR_VERSION_2017_10_30;
case 3: return IR_VERSION;
default: return null;
}
}
public static org.nd4j.shade.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final org.nd4j.shade.protobuf.Internal.EnumLiteMap<
Version> internalValueMap =
new org.nd4j.shade.protobuf.Internal.EnumLiteMap() {
public Version findValueByNumber(int number) {
return Version.forNumber(number);
}
};
public final org.nd4j.shade.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
return getDescriptor().getValues().get(ordinal());
}
public final org.nd4j.shade.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final org.nd4j.shade.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return onnx.Onnx.getDescriptor().getEnumTypes().get(0);
}
private static final Version[] VALUES = values();
public static Version valueOf(
org.nd4j.shade.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private Version(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:onnx.Version)
}
public interface AttributeProtoOrBuilder extends
// @@protoc_insertion_point(interface_extends:onnx.AttributeProto)
org.nd4j.shade.protobuf.MessageOrBuilder {
/**
*
* The name field MUST be present for this version of the IR.
*
* The type field MUST be present for this version of the IR.
* For 0.0.1 versions of the IR, this field was not defined, and
* implementations needed to use has_field hueristics to determine
* which value field was in use. For IR_VERSION 0.0.2 or later, this
* field MUST be set and match the f|i|s|t|... field in use. This
* change was made to accomodate proto3 implementations.
*
*
* .onnx.AttributeProto.AttributeType type = 20;
*/
int getTypeValue();
/**
*
* The type field MUST be present for this version of the IR.
* For 0.0.1 versions of the IR, this field was not defined, and
* implementations needed to use has_field hueristics to determine
* which value field was in use. For IR_VERSION 0.0.2 or later, this
* field MUST be set and match the f|i|s|t|... field in use. This
* change was made to accomodate proto3 implementations.
*
* A named attribute containing either singular float, integer, string
* and tensor values, or repeated float, integer, string and tensor values.
* An AttributeProto MUST contain the name field, and *only one* of the
* following content fields, effectively enforcing a C/C++ union equivalent.
*
*
* Protobuf type {@code onnx.AttributeProto}
*/
public static final class AttributeProto extends
org.nd4j.shade.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:onnx.AttributeProto)
AttributeProtoOrBuilder {
private static final long serialVersionUID = 0L;
// Use AttributeProto.newBuilder() to construct.
private AttributeProto(org.nd4j.shade.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private AttributeProto() {
name_ = "";
docString_ = "";
type_ = 0;
f_ = 0F;
i_ = 0L;
s_ = org.nd4j.shade.protobuf.ByteString.EMPTY;
floats_ = java.util.Collections.emptyList();
ints_ = java.util.Collections.emptyList();
strings_ = java.util.Collections.emptyList();
tensors_ = java.util.Collections.emptyList();
graphs_ = java.util.Collections.emptyList();
}
@java.lang.Override
public final org.nd4j.shade.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private AttributeProto(
org.nd4j.shade.protobuf.CodedInputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
org.nd4j.shade.protobuf.UnknownFieldSet.Builder unknownFields =
org.nd4j.shade.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
case 10: {
java.lang.String s = input.readStringRequireUtf8();
name_ = s;
break;
}
case 21: {
f_ = input.readFloat();
break;
}
case 24: {
i_ = input.readInt64();
break;
}
case 34: {
s_ = input.readBytes();
break;
}
case 42: {
onnx.Onnx.TensorProto.Builder subBuilder = null;
if (t_ != null) {
subBuilder = t_.toBuilder();
}
t_ = input.readMessage(onnx.Onnx.TensorProto.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(t_);
t_ = subBuilder.buildPartial();
}
break;
}
case 50: {
onnx.Onnx.GraphProto.Builder subBuilder = null;
if (g_ != null) {
subBuilder = g_.toBuilder();
}
g_ = input.readMessage(onnx.Onnx.GraphProto.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(g_);
g_ = subBuilder.buildPartial();
}
break;
}
case 61: {
if (!((mutable_bitField0_ & 0x00000100) == 0x00000100)) {
floats_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000100;
}
floats_.add(input.readFloat());
break;
}
case 58: {
int length = input.readRawVarint32();
int limit = input.pushLimit(length);
if (!((mutable_bitField0_ & 0x00000100) == 0x00000100) && input.getBytesUntilLimit() > 0) {
floats_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000100;
}
while (input.getBytesUntilLimit() > 0) {
floats_.add(input.readFloat());
}
input.popLimit(limit);
break;
}
case 64: {
if (!((mutable_bitField0_ & 0x00000200) == 0x00000200)) {
ints_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000200;
}
ints_.add(input.readInt64());
break;
}
case 66: {
int length = input.readRawVarint32();
int limit = input.pushLimit(length);
if (!((mutable_bitField0_ & 0x00000200) == 0x00000200) && input.getBytesUntilLimit() > 0) {
ints_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000200;
}
while (input.getBytesUntilLimit() > 0) {
ints_.add(input.readInt64());
}
input.popLimit(limit);
break;
}
case 74: {
if (!((mutable_bitField0_ & 0x00000400) == 0x00000400)) {
strings_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000400;
}
strings_.add(input.readBytes());
break;
}
case 82: {
if (!((mutable_bitField0_ & 0x00000800) == 0x00000800)) {
tensors_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000800;
}
tensors_.add(
input.readMessage(onnx.Onnx.TensorProto.parser(), extensionRegistry));
break;
}
case 90: {
if (!((mutable_bitField0_ & 0x00001000) == 0x00001000)) {
graphs_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00001000;
}
graphs_.add(
input.readMessage(onnx.Onnx.GraphProto.parser(), extensionRegistry));
break;
}
case 106: {
java.lang.String s = input.readStringRequireUtf8();
docString_ = s;
break;
}
case 160: {
int rawValue = input.readEnum();
type_ = rawValue;
break;
}
}
}
} catch (org.nd4j.shade.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new org.nd4j.shade.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000100) == 0x00000100)) {
floats_ = java.util.Collections.unmodifiableList(floats_);
}
if (((mutable_bitField0_ & 0x00000200) == 0x00000200)) {
ints_ = java.util.Collections.unmodifiableList(ints_);
}
if (((mutable_bitField0_ & 0x00000400) == 0x00000400)) {
strings_ = java.util.Collections.unmodifiableList(strings_);
}
if (((mutable_bitField0_ & 0x00000800) == 0x00000800)) {
tensors_ = java.util.Collections.unmodifiableList(tensors_);
}
if (((mutable_bitField0_ & 0x00001000) == 0x00001000)) {
graphs_ = java.util.Collections.unmodifiableList(graphs_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final org.nd4j.shade.protobuf.Descriptors.Descriptor
getDescriptor() {
return onnx.Onnx.internal_static_onnx_AttributeProto_descriptor;
}
protected org.nd4j.shade.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return onnx.Onnx.internal_static_onnx_AttributeProto_fieldAccessorTable
.ensureFieldAccessorsInitialized(
onnx.Onnx.AttributeProto.class, onnx.Onnx.AttributeProto.Builder.class);
}
/**
*
* Note: this enum is structurally identical to the OpSchema::AttrType
* enum defined in schema.h. If you rev one, you likely need to rev the other.
*
*
* Protobuf enum {@code onnx.AttributeProto.AttributeType}
*/
public enum AttributeType
implements org.nd4j.shade.protobuf.ProtocolMessageEnum {
/**
* UNDEFINED = 0;
*/
UNDEFINED(0),
/**
* FLOAT = 1;
*/
FLOAT(1),
/**
* INT = 2;
*/
INT(2),
/**
* STRING = 3;
*/
STRING(3),
/**
* TENSOR = 4;
*/
TENSOR(4),
/**
* GRAPH = 5;
*/
GRAPH(5),
/**
* FLOATS = 6;
*/
FLOATS(6),
/**
* INTS = 7;
*/
INTS(7),
/**
* STRINGS = 8;
*/
STRINGS(8),
/**
* TENSORS = 9;
*/
TENSORS(9),
/**
* GRAPHS = 10;
*/
GRAPHS(10),
UNRECOGNIZED(-1),
;
/**
* UNDEFINED = 0;
*/
public static final int UNDEFINED_VALUE = 0;
/**
* FLOAT = 1;
*/
public static final int FLOAT_VALUE = 1;
/**
* INT = 2;
*/
public static final int INT_VALUE = 2;
/**
* STRING = 3;
*/
public static final int STRING_VALUE = 3;
/**
* TENSOR = 4;
*/
public static final int TENSOR_VALUE = 4;
/**
* GRAPH = 5;
*/
public static final int GRAPH_VALUE = 5;
/**
* FLOATS = 6;
*/
public static final int FLOATS_VALUE = 6;
/**
* INTS = 7;
*/
public static final int INTS_VALUE = 7;
/**
* STRINGS = 8;
*/
public static final int STRINGS_VALUE = 8;
/**
* TENSORS = 9;
*/
public static final int TENSORS_VALUE = 9;
/**
* GRAPHS = 10;
*/
public static final int GRAPHS_VALUE = 10;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static AttributeType valueOf(int value) {
return forNumber(value);
}
public static AttributeType forNumber(int value) {
switch (value) {
case 0: return UNDEFINED;
case 1: return FLOAT;
case 2: return INT;
case 3: return STRING;
case 4: return TENSOR;
case 5: return GRAPH;
case 6: return FLOATS;
case 7: return INTS;
case 8: return STRINGS;
case 9: return TENSORS;
case 10: return GRAPHS;
default: return null;
}
}
public static org.nd4j.shade.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final org.nd4j.shade.protobuf.Internal.EnumLiteMap<
AttributeType> internalValueMap =
new org.nd4j.shade.protobuf.Internal.EnumLiteMap() {
public AttributeType findValueByNumber(int number) {
return AttributeType.forNumber(number);
}
};
public final org.nd4j.shade.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
return getDescriptor().getValues().get(ordinal());
}
public final org.nd4j.shade.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final org.nd4j.shade.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return onnx.Onnx.AttributeProto.getDescriptor().getEnumTypes().get(0);
}
private static final AttributeType[] VALUES = values();
public static AttributeType valueOf(
org.nd4j.shade.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private AttributeType(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:onnx.AttributeProto.AttributeType)
}
private int bitField0_;
public static final int NAME_FIELD_NUMBER = 1;
private volatile java.lang.Object name_;
/**
*
* The name field MUST be present for this version of the IR.
*
* A human-readable documentation for this attribute. Markdown is allowed.
*
*
* string doc_string = 13;
*/
public org.nd4j.shade.protobuf.ByteString
getDocStringBytes() {
java.lang.Object ref = docString_;
if (ref instanceof java.lang.String) {
org.nd4j.shade.protobuf.ByteString b =
org.nd4j.shade.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
docString_ = b;
return b;
} else {
return (org.nd4j.shade.protobuf.ByteString) ref;
}
}
public static final int TYPE_FIELD_NUMBER = 20;
private int type_;
/**
*
* The type field MUST be present for this version of the IR.
* For 0.0.1 versions of the IR, this field was not defined, and
* implementations needed to use has_field hueristics to determine
* which value field was in use. For IR_VERSION 0.0.2 or later, this
* field MUST be set and match the f|i|s|t|... field in use. This
* change was made to accomodate proto3 implementations.
*
*
* .onnx.AttributeProto.AttributeType type = 20;
*/
public int getTypeValue() {
return type_;
}
/**
*
* The type field MUST be present for this version of the IR.
* For 0.0.1 versions of the IR, this field was not defined, and
* implementations needed to use has_field hueristics to determine
* which value field was in use. For IR_VERSION 0.0.2 or later, this
* field MUST be set and match the f|i|s|t|... field in use. This
* change was made to accomodate proto3 implementations.
*
*
* .onnx.AttributeProto.AttributeType type = 20;
*/
public onnx.Onnx.AttributeProto.AttributeType getType() {
onnx.Onnx.AttributeProto.AttributeType result = onnx.Onnx.AttributeProto.AttributeType.valueOf(type_);
return result == null ? onnx.Onnx.AttributeProto.AttributeType.UNRECOGNIZED : result;
}
public static final int F_FIELD_NUMBER = 2;
private float f_;
/**
*
* Exactly ONE of the following fields must be present for this version of the IR
*
*
* float f = 2;
*/
public float getF() {
return f_;
}
public static final int I_FIELD_NUMBER = 3;
private long i_;
/**
*
* int
*
*
* int64 i = 3;
*/
public long getI() {
return i_;
}
public static final int S_FIELD_NUMBER = 4;
private org.nd4j.shade.protobuf.ByteString s_;
/**
*
* UTF-8 string
*
*
* bytes s = 4;
*/
public org.nd4j.shade.protobuf.ByteString getS() {
return s_;
}
public static final int T_FIELD_NUMBER = 5;
private onnx.Onnx.TensorProto t_;
/**
*
* tensor value
*
*
* .onnx.TensorProto t = 5;
*/
public boolean hasT() {
return t_ != null;
}
/**
*
*
* repeated .onnx.GraphProto graphs = 11;
*/
public onnx.Onnx.GraphProtoOrBuilder getGraphsOrBuilder(
int index) {
return graphs_.get(index);
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(org.nd4j.shade.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
if (!getNameBytes().isEmpty()) {
org.nd4j.shade.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
}
if (f_ != 0F) {
output.writeFloat(2, f_);
}
if (i_ != 0L) {
output.writeInt64(3, i_);
}
if (!s_.isEmpty()) {
output.writeBytes(4, s_);
}
if (t_ != null) {
output.writeMessage(5, getT());
}
if (g_ != null) {
output.writeMessage(6, getG());
}
if (getFloatsList().size() > 0) {
output.writeUInt32NoTag(58);
output.writeUInt32NoTag(floatsMemoizedSerializedSize);
}
for (int i = 0; i < floats_.size(); i++) {
output.writeFloatNoTag(floats_.get(i));
}
if (getIntsList().size() > 0) {
output.writeUInt32NoTag(66);
output.writeUInt32NoTag(intsMemoizedSerializedSize);
}
for (int i = 0; i < ints_.size(); i++) {
output.writeInt64NoTag(ints_.get(i));
}
for (int i = 0; i < strings_.size(); i++) {
output.writeBytes(9, strings_.get(i));
}
for (int i = 0; i < tensors_.size(); i++) {
output.writeMessage(10, tensors_.get(i));
}
for (int i = 0; i < graphs_.size(); i++) {
output.writeMessage(11, graphs_.get(i));
}
if (!getDocStringBytes().isEmpty()) {
org.nd4j.shade.protobuf.GeneratedMessageV3.writeString(output, 13, docString_);
}
if (type_ != onnx.Onnx.AttributeProto.AttributeType.UNDEFINED.getNumber()) {
output.writeEnum(20, type_);
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getNameBytes().isEmpty()) {
size += org.nd4j.shade.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
}
if (f_ != 0F) {
size += org.nd4j.shade.protobuf.CodedOutputStream
.computeFloatSize(2, f_);
}
if (i_ != 0L) {
size += org.nd4j.shade.protobuf.CodedOutputStream
.computeInt64Size(3, i_);
}
if (!s_.isEmpty()) {
size += org.nd4j.shade.protobuf.CodedOutputStream
.computeBytesSize(4, s_);
}
if (t_ != null) {
size += org.nd4j.shade.protobuf.CodedOutputStream
.computeMessageSize(5, getT());
}
if (g_ != null) {
size += org.nd4j.shade.protobuf.CodedOutputStream
.computeMessageSize(6, getG());
}
{
int dataSize = 0;
dataSize = 4 * getFloatsList().size();
size += dataSize;
if (!getFloatsList().isEmpty()) {
size += 1;
size += org.nd4j.shade.protobuf.CodedOutputStream
.computeInt32SizeNoTag(dataSize);
}
floatsMemoizedSerializedSize = dataSize;
}
{
int dataSize = 0;
for (int i = 0; i < ints_.size(); i++) {
dataSize += org.nd4j.shade.protobuf.CodedOutputStream
.computeInt64SizeNoTag(ints_.get(i));
}
size += dataSize;
if (!getIntsList().isEmpty()) {
size += 1;
size += org.nd4j.shade.protobuf.CodedOutputStream
.computeInt32SizeNoTag(dataSize);
}
intsMemoizedSerializedSize = dataSize;
}
{
int dataSize = 0;
for (int i = 0; i < strings_.size(); i++) {
dataSize += org.nd4j.shade.protobuf.CodedOutputStream
.computeBytesSizeNoTag(strings_.get(i));
}
size += dataSize;
size += 1 * getStringsList().size();
}
for (int i = 0; i < tensors_.size(); i++) {
size += org.nd4j.shade.protobuf.CodedOutputStream
.computeMessageSize(10, tensors_.get(i));
}
for (int i = 0; i < graphs_.size(); i++) {
size += org.nd4j.shade.protobuf.CodedOutputStream
.computeMessageSize(11, graphs_.get(i));
}
if (!getDocStringBytes().isEmpty()) {
size += org.nd4j.shade.protobuf.GeneratedMessageV3.computeStringSize(13, docString_);
}
if (type_ != onnx.Onnx.AttributeProto.AttributeType.UNDEFINED.getNumber()) {
size += org.nd4j.shade.protobuf.CodedOutputStream
.computeEnumSize(20, type_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof onnx.Onnx.AttributeProto)) {
return super.equals(obj);
}
onnx.Onnx.AttributeProto other = (onnx.Onnx.AttributeProto) obj;
boolean result = true;
result = result && getName()
.equals(other.getName());
result = result && getDocString()
.equals(other.getDocString());
result = result && type_ == other.type_;
result = result && (
java.lang.Float.floatToIntBits(getF())
== java.lang.Float.floatToIntBits(
other.getF()));
result = result && (getI()
== other.getI());
result = result && getS()
.equals(other.getS());
result = result && (hasT() == other.hasT());
if (hasT()) {
result = result && getT()
.equals(other.getT());
}
result = result && (hasG() == other.hasG());
if (hasG()) {
result = result && getG()
.equals(other.getG());
}
result = result && getFloatsList()
.equals(other.getFloatsList());
result = result && getIntsList()
.equals(other.getIntsList());
result = result && getStringsList()
.equals(other.getStringsList());
result = result && getTensorsList()
.equals(other.getTensorsList());
result = result && getGraphsList()
.equals(other.getGraphsList());
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
hash = (37 * hash) + DOC_STRING_FIELD_NUMBER;
hash = (53 * hash) + getDocString().hashCode();
hash = (37 * hash) + TYPE_FIELD_NUMBER;
hash = (53 * hash) + type_;
hash = (37 * hash) + F_FIELD_NUMBER;
hash = (53 * hash) + java.lang.Float.floatToIntBits(
getF());
hash = (37 * hash) + I_FIELD_NUMBER;
hash = (53 * hash) + org.nd4j.shade.protobuf.Internal.hashLong(
getI());
hash = (37 * hash) + S_FIELD_NUMBER;
hash = (53 * hash) + getS().hashCode();
if (hasT()) {
hash = (37 * hash) + T_FIELD_NUMBER;
hash = (53 * hash) + getT().hashCode();
}
if (hasG()) {
hash = (37 * hash) + G_FIELD_NUMBER;
hash = (53 * hash) + getG().hashCode();
}
if (getFloatsCount() > 0) {
hash = (37 * hash) + FLOATS_FIELD_NUMBER;
hash = (53 * hash) + getFloatsList().hashCode();
}
if (getIntsCount() > 0) {
hash = (37 * hash) + INTS_FIELD_NUMBER;
hash = (53 * hash) + getIntsList().hashCode();
}
if (getStringsCount() > 0) {
hash = (37 * hash) + STRINGS_FIELD_NUMBER;
hash = (53 * hash) + getStringsList().hashCode();
}
if (getTensorsCount() > 0) {
hash = (37 * hash) + TENSORS_FIELD_NUMBER;
hash = (53 * hash) + getTensorsList().hashCode();
}
if (getGraphsCount() > 0) {
hash = (37 * hash) + GRAPHS_FIELD_NUMBER;
hash = (53 * hash) + getGraphsList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static onnx.Onnx.AttributeProto parseFrom(
java.nio.ByteBuffer data)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static onnx.Onnx.AttributeProto parseFrom(
java.nio.ByteBuffer data,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static onnx.Onnx.AttributeProto parseFrom(
org.nd4j.shade.protobuf.ByteString data)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static onnx.Onnx.AttributeProto parseFrom(
org.nd4j.shade.protobuf.ByteString data,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static onnx.Onnx.AttributeProto parseFrom(byte[] data)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static onnx.Onnx.AttributeProto parseFrom(
byte[] data,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static onnx.Onnx.AttributeProto parseFrom(java.io.InputStream input)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static onnx.Onnx.AttributeProto parseFrom(
java.io.InputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static onnx.Onnx.AttributeProto parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static onnx.Onnx.AttributeProto parseDelimitedFrom(
java.io.InputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static onnx.Onnx.AttributeProto parseFrom(
org.nd4j.shade.protobuf.CodedInputStream input)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static onnx.Onnx.AttributeProto parseFrom(
org.nd4j.shade.protobuf.CodedInputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(onnx.Onnx.AttributeProto prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
org.nd4j.shade.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* A named attribute containing either singular float, integer, string
* and tensor values, or repeated float, integer, string and tensor values.
* An AttributeProto MUST contain the name field, and *only one* of the
* following content fields, effectively enforcing a C/C++ union equivalent.
*
* A human-readable documentation for this attribute. Markdown is allowed.
*
*
* string doc_string = 13;
*/
public Builder setDocStringBytes(
org.nd4j.shade.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
docString_ = value;
onChanged();
return this;
}
private int type_ = 0;
/**
*
* The type field MUST be present for this version of the IR.
* For 0.0.1 versions of the IR, this field was not defined, and
* implementations needed to use has_field hueristics to determine
* which value field was in use. For IR_VERSION 0.0.2 or later, this
* field MUST be set and match the f|i|s|t|... field in use. This
* change was made to accomodate proto3 implementations.
*
*
* .onnx.AttributeProto.AttributeType type = 20;
*/
public int getTypeValue() {
return type_;
}
/**
*
* The type field MUST be present for this version of the IR.
* For 0.0.1 versions of the IR, this field was not defined, and
* implementations needed to use has_field hueristics to determine
* which value field was in use. For IR_VERSION 0.0.2 or later, this
* field MUST be set and match the f|i|s|t|... field in use. This
* change was made to accomodate proto3 implementations.
*
* The type field MUST be present for this version of the IR.
* For 0.0.1 versions of the IR, this field was not defined, and
* implementations needed to use has_field hueristics to determine
* which value field was in use. For IR_VERSION 0.0.2 or later, this
* field MUST be set and match the f|i|s|t|... field in use. This
* change was made to accomodate proto3 implementations.
*
*
* .onnx.AttributeProto.AttributeType type = 20;
*/
public onnx.Onnx.AttributeProto.AttributeType getType() {
onnx.Onnx.AttributeProto.AttributeType result = onnx.Onnx.AttributeProto.AttributeType.valueOf(type_);
return result == null ? onnx.Onnx.AttributeProto.AttributeType.UNRECOGNIZED : result;
}
/**
*
* The type field MUST be present for this version of the IR.
* For 0.0.1 versions of the IR, this field was not defined, and
* implementations needed to use has_field hueristics to determine
* which value field was in use. For IR_VERSION 0.0.2 or later, this
* field MUST be set and match the f|i|s|t|... field in use. This
* change was made to accomodate proto3 implementations.
*
*
* .onnx.AttributeProto.AttributeType type = 20;
*/
public Builder setType(onnx.Onnx.AttributeProto.AttributeType value) {
if (value == null) {
throw new NullPointerException();
}
type_ = value.getNumber();
onChanged();
return this;
}
/**
*
* The type field MUST be present for this version of the IR.
* For 0.0.1 versions of the IR, this field was not defined, and
* implementations needed to use has_field hueristics to determine
* which value field was in use. For IR_VERSION 0.0.2 or later, this
* field MUST be set and match the f|i|s|t|... field in use. This
* change was made to accomodate proto3 implementations.
*
* Additional named attributes.
* NOTE: Simply using ValueProto.NameValuePairProto is the most general
* solution. I kept AttributeProto to minimize churn on CI results.
*
* Additional named attributes.
* NOTE: Simply using ValueProto.NameValuePairProto is the most general
* solution. I kept AttributeProto to minimize churn on CI results.
*
* Additional named attributes.
* NOTE: Simply using ValueProto.NameValuePairProto is the most general
* solution. I kept AttributeProto to minimize churn on CI results.
*
* Additional named attributes.
* NOTE: Simply using ValueProto.NameValuePairProto is the most general
* solution. I kept AttributeProto to minimize churn on CI results.
*
* Additional named attributes.
* NOTE: Simply using ValueProto.NameValuePairProto is the most general
* solution. I kept AttributeProto to minimize churn on CI results.
*
* NodeProto stores a node that is similar to the notion of "layer"
* or "operator" in many deep learning frameworks. For example, it can be a
* node of type "Conv" that takes in an image, a filter tensor and a bias
* tensor, and produces the convolved output.
*
*
* Protobuf type {@code onnx.NodeProto}
*/
public static final class NodeProto extends
org.nd4j.shade.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:onnx.NodeProto)
NodeProtoOrBuilder {
private static final long serialVersionUID = 0L;
// Use NodeProto.newBuilder() to construct.
private NodeProto(org.nd4j.shade.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private NodeProto() {
input_ = org.nd4j.shade.protobuf.LazyStringArrayList.EMPTY;
output_ = org.nd4j.shade.protobuf.LazyStringArrayList.EMPTY;
name_ = "";
opType_ = "";
domain_ = "";
attribute_ = java.util.Collections.emptyList();
docString_ = "";
}
@java.lang.Override
public final org.nd4j.shade.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private NodeProto(
org.nd4j.shade.protobuf.CodedInputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
org.nd4j.shade.protobuf.UnknownFieldSet.Builder unknownFields =
org.nd4j.shade.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
case 10: {
java.lang.String s = input.readStringRequireUtf8();
if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
input_ = new org.nd4j.shade.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000001;
}
input_.add(s);
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
output_ = new org.nd4j.shade.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000002;
}
output_.add(s);
break;
}
case 26: {
java.lang.String s = input.readStringRequireUtf8();
name_ = s;
break;
}
case 34: {
java.lang.String s = input.readStringRequireUtf8();
opType_ = s;
break;
}
case 42: {
if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) {
attribute_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000020;
}
attribute_.add(
input.readMessage(onnx.Onnx.AttributeProto.parser(), extensionRegistry));
break;
}
case 50: {
java.lang.String s = input.readStringRequireUtf8();
docString_ = s;
break;
}
case 58: {
java.lang.String s = input.readStringRequireUtf8();
domain_ = s;
break;
}
}
}
} catch (org.nd4j.shade.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new org.nd4j.shade.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
input_ = input_.getUnmodifiableView();
}
if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
output_ = output_.getUnmodifiableView();
}
if (((mutable_bitField0_ & 0x00000020) == 0x00000020)) {
attribute_ = java.util.Collections.unmodifiableList(attribute_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final org.nd4j.shade.protobuf.Descriptors.Descriptor
getDescriptor() {
return onnx.Onnx.internal_static_onnx_NodeProto_descriptor;
}
protected org.nd4j.shade.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return onnx.Onnx.internal_static_onnx_NodeProto_fieldAccessorTable
.ensureFieldAccessorsInitialized(
onnx.Onnx.NodeProto.class, onnx.Onnx.NodeProto.Builder.class);
}
private int bitField0_;
public static final int INPUT_FIELD_NUMBER = 1;
private org.nd4j.shade.protobuf.LazyStringList input_;
/**
*
* The domain of the OperatorSet that specifies the operator named by op_type.
*
*
* string domain = 7;
*/
public org.nd4j.shade.protobuf.ByteString
getDomainBytes() {
java.lang.Object ref = domain_;
if (ref instanceof java.lang.String) {
org.nd4j.shade.protobuf.ByteString b =
org.nd4j.shade.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
domain_ = b;
return b;
} else {
return (org.nd4j.shade.protobuf.ByteString) ref;
}
}
public static final int ATTRIBUTE_FIELD_NUMBER = 5;
private java.util.List attribute_;
/**
*
* Additional named attributes.
* NOTE: Simply using ValueProto.NameValuePairProto is the most general
* solution. I kept AttributeProto to minimize churn on CI results.
*
* Additional named attributes.
* NOTE: Simply using ValueProto.NameValuePairProto is the most general
* solution. I kept AttributeProto to minimize churn on CI results.
*
* Additional named attributes.
* NOTE: Simply using ValueProto.NameValuePairProto is the most general
* solution. I kept AttributeProto to minimize churn on CI results.
*
*
* repeated .onnx.AttributeProto attribute = 5;
*/
public int getAttributeCount() {
return attribute_.size();
}
/**
*
* Additional named attributes.
* NOTE: Simply using ValueProto.NameValuePairProto is the most general
* solution. I kept AttributeProto to minimize churn on CI results.
*
* Additional named attributes.
* NOTE: Simply using ValueProto.NameValuePairProto is the most general
* solution. I kept AttributeProto to minimize churn on CI results.
*
*
* repeated .onnx.AttributeProto attribute = 5;
*/
public onnx.Onnx.AttributeProtoOrBuilder getAttributeOrBuilder(
int index) {
return attribute_.get(index);
}
public static final int DOC_STRING_FIELD_NUMBER = 6;
private volatile java.lang.Object docString_;
/**
*
* A human-readable documentation for this node. Markdown is allowed.
*
* A human-readable documentation for this node. Markdown is allowed.
*
*
* string doc_string = 6;
*/
public org.nd4j.shade.protobuf.ByteString
getDocStringBytes() {
java.lang.Object ref = docString_;
if (ref instanceof java.lang.String) {
org.nd4j.shade.protobuf.ByteString b =
org.nd4j.shade.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
docString_ = b;
return b;
} else {
return (org.nd4j.shade.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(org.nd4j.shade.protobuf.CodedOutputStream output)
throws java.io.IOException {
for (int i = 0; i < input_.size(); i++) {
org.nd4j.shade.protobuf.GeneratedMessageV3.writeString(output, 1, input_.getRaw(i));
}
for (int i = 0; i < output_.size(); i++) {
org.nd4j.shade.protobuf.GeneratedMessageV3.writeString(output, 2, output_.getRaw(i));
}
if (!getNameBytes().isEmpty()) {
org.nd4j.shade.protobuf.GeneratedMessageV3.writeString(output, 3, name_);
}
if (!getOpTypeBytes().isEmpty()) {
org.nd4j.shade.protobuf.GeneratedMessageV3.writeString(output, 4, opType_);
}
for (int i = 0; i < attribute_.size(); i++) {
output.writeMessage(5, attribute_.get(i));
}
if (!getDocStringBytes().isEmpty()) {
org.nd4j.shade.protobuf.GeneratedMessageV3.writeString(output, 6, docString_);
}
if (!getDomainBytes().isEmpty()) {
org.nd4j.shade.protobuf.GeneratedMessageV3.writeString(output, 7, domain_);
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
{
int dataSize = 0;
for (int i = 0; i < input_.size(); i++) {
dataSize += computeStringSizeNoTag(input_.getRaw(i));
}
size += dataSize;
size += 1 * getInputList().size();
}
{
int dataSize = 0;
for (int i = 0; i < output_.size(); i++) {
dataSize += computeStringSizeNoTag(output_.getRaw(i));
}
size += dataSize;
size += 1 * getOutputList().size();
}
if (!getNameBytes().isEmpty()) {
size += org.nd4j.shade.protobuf.GeneratedMessageV3.computeStringSize(3, name_);
}
if (!getOpTypeBytes().isEmpty()) {
size += org.nd4j.shade.protobuf.GeneratedMessageV3.computeStringSize(4, opType_);
}
for (int i = 0; i < attribute_.size(); i++) {
size += org.nd4j.shade.protobuf.CodedOutputStream
.computeMessageSize(5, attribute_.get(i));
}
if (!getDocStringBytes().isEmpty()) {
size += org.nd4j.shade.protobuf.GeneratedMessageV3.computeStringSize(6, docString_);
}
if (!getDomainBytes().isEmpty()) {
size += org.nd4j.shade.protobuf.GeneratedMessageV3.computeStringSize(7, domain_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof onnx.Onnx.NodeProto)) {
return super.equals(obj);
}
onnx.Onnx.NodeProto other = (onnx.Onnx.NodeProto) obj;
boolean result = true;
result = result && getInputList()
.equals(other.getInputList());
result = result && getOutputList()
.equals(other.getOutputList());
result = result && getName()
.equals(other.getName());
result = result && getOpType()
.equals(other.getOpType());
result = result && getDomain()
.equals(other.getDomain());
result = result && getAttributeList()
.equals(other.getAttributeList());
result = result && getDocString()
.equals(other.getDocString());
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (getInputCount() > 0) {
hash = (37 * hash) + INPUT_FIELD_NUMBER;
hash = (53 * hash) + getInputList().hashCode();
}
if (getOutputCount() > 0) {
hash = (37 * hash) + OUTPUT_FIELD_NUMBER;
hash = (53 * hash) + getOutputList().hashCode();
}
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
hash = (37 * hash) + OP_TYPE_FIELD_NUMBER;
hash = (53 * hash) + getOpType().hashCode();
hash = (37 * hash) + DOMAIN_FIELD_NUMBER;
hash = (53 * hash) + getDomain().hashCode();
if (getAttributeCount() > 0) {
hash = (37 * hash) + ATTRIBUTE_FIELD_NUMBER;
hash = (53 * hash) + getAttributeList().hashCode();
}
hash = (37 * hash) + DOC_STRING_FIELD_NUMBER;
hash = (53 * hash) + getDocString().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static onnx.Onnx.NodeProto parseFrom(
java.nio.ByteBuffer data)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static onnx.Onnx.NodeProto parseFrom(
java.nio.ByteBuffer data,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static onnx.Onnx.NodeProto parseFrom(
org.nd4j.shade.protobuf.ByteString data)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static onnx.Onnx.NodeProto parseFrom(
org.nd4j.shade.protobuf.ByteString data,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static onnx.Onnx.NodeProto parseFrom(byte[] data)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static onnx.Onnx.NodeProto parseFrom(
byte[] data,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static onnx.Onnx.NodeProto parseFrom(java.io.InputStream input)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static onnx.Onnx.NodeProto parseFrom(
java.io.InputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static onnx.Onnx.NodeProto parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static onnx.Onnx.NodeProto parseDelimitedFrom(
java.io.InputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static onnx.Onnx.NodeProto parseFrom(
org.nd4j.shade.protobuf.CodedInputStream input)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static onnx.Onnx.NodeProto parseFrom(
org.nd4j.shade.protobuf.CodedInputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(onnx.Onnx.NodeProto prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
org.nd4j.shade.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* NodeProto stores a node that is similar to the notion of "layer"
* or "operator" in many deep learning frameworks. For example, it can be a
* node of type "Conv" that takes in an image, a filter tensor and a bias
* tensor, and produces the convolved output.
*
* Additional named attributes.
* NOTE: Simply using ValueProto.NameValuePairProto is the most general
* solution. I kept AttributeProto to minimize churn on CI results.
*
* Additional named attributes.
* NOTE: Simply using ValueProto.NameValuePairProto is the most general
* solution. I kept AttributeProto to minimize churn on CI results.
*
*
* repeated .onnx.AttributeProto attribute = 5;
*/
public int getAttributeCount() {
if (attributeBuilder_ == null) {
return attribute_.size();
} else {
return attributeBuilder_.getCount();
}
}
/**
*
* Additional named attributes.
* NOTE: Simply using ValueProto.NameValuePairProto is the most general
* solution. I kept AttributeProto to minimize churn on CI results.
*
* Additional named attributes.
* NOTE: Simply using ValueProto.NameValuePairProto is the most general
* solution. I kept AttributeProto to minimize churn on CI results.
*
*
* repeated .onnx.AttributeProto attribute = 5;
*/
public Builder setAttribute(
int index, onnx.Onnx.AttributeProto value) {
if (attributeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureAttributeIsMutable();
attribute_.set(index, value);
onChanged();
} else {
attributeBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Additional named attributes.
* NOTE: Simply using ValueProto.NameValuePairProto is the most general
* solution. I kept AttributeProto to minimize churn on CI results.
*
* Additional named attributes.
* NOTE: Simply using ValueProto.NameValuePairProto is the most general
* solution. I kept AttributeProto to minimize churn on CI results.
*
*
* repeated .onnx.AttributeProto attribute = 5;
*/
public Builder addAttribute(onnx.Onnx.AttributeProto value) {
if (attributeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureAttributeIsMutable();
attribute_.add(value);
onChanged();
} else {
attributeBuilder_.addMessage(value);
}
return this;
}
/**
*
* Additional named attributes.
* NOTE: Simply using ValueProto.NameValuePairProto is the most general
* solution. I kept AttributeProto to minimize churn on CI results.
*
*
* repeated .onnx.AttributeProto attribute = 5;
*/
public Builder addAttribute(
int index, onnx.Onnx.AttributeProto value) {
if (attributeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureAttributeIsMutable();
attribute_.add(index, value);
onChanged();
} else {
attributeBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Additional named attributes.
* NOTE: Simply using ValueProto.NameValuePairProto is the most general
* solution. I kept AttributeProto to minimize churn on CI results.
*
* Additional named attributes.
* NOTE: Simply using ValueProto.NameValuePairProto is the most general
* solution. I kept AttributeProto to minimize churn on CI results.
*
* Additional named attributes.
* NOTE: Simply using ValueProto.NameValuePairProto is the most general
* solution. I kept AttributeProto to minimize churn on CI results.
*
* Additional named attributes.
* NOTE: Simply using ValueProto.NameValuePairProto is the most general
* solution. I kept AttributeProto to minimize churn on CI results.
*
* Additional named attributes.
* NOTE: Simply using ValueProto.NameValuePairProto is the most general
* solution. I kept AttributeProto to minimize churn on CI results.
*
* Additional named attributes.
* NOTE: Simply using ValueProto.NameValuePairProto is the most general
* solution. I kept AttributeProto to minimize churn on CI results.
*
*
* repeated .onnx.AttributeProto attribute = 5;
*/
public onnx.Onnx.AttributeProto.Builder getAttributeBuilder(
int index) {
return getAttributeFieldBuilder().getBuilder(index);
}
/**
*
* Additional named attributes.
* NOTE: Simply using ValueProto.NameValuePairProto is the most general
* solution. I kept AttributeProto to minimize churn on CI results.
*
*
* repeated .onnx.AttributeProto attribute = 5;
*/
public onnx.Onnx.AttributeProtoOrBuilder getAttributeOrBuilder(
int index) {
if (attributeBuilder_ == null) {
return attribute_.get(index); } else {
return attributeBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Additional named attributes.
* NOTE: Simply using ValueProto.NameValuePairProto is the most general
* solution. I kept AttributeProto to minimize churn on CI results.
*
* Additional named attributes.
* NOTE: Simply using ValueProto.NameValuePairProto is the most general
* solution. I kept AttributeProto to minimize churn on CI results.
*
* Additional named attributes.
* NOTE: Simply using ValueProto.NameValuePairProto is the most general
* solution. I kept AttributeProto to minimize churn on CI results.
*
* Additional named attributes.
* NOTE: Simply using ValueProto.NameValuePairProto is the most general
* solution. I kept AttributeProto to minimize churn on CI results.
*
* The OperatorSets this model relies on.
* All ModelProtos MUST have at least one entry that
* specifies which version of the ONNX OperatorSet is
* being imported.
* All nodes in the ModelProto's graph will bind against the operator
* with the same-domain/same-op_type operator with the HIGHEST version
* in the referenced operator sets.
*
* The OperatorSets this model relies on.
* All ModelProtos MUST have at least one entry that
* specifies which version of the ONNX OperatorSet is
* being imported.
* All nodes in the ModelProto's graph will bind against the operator
* with the same-domain/same-op_type operator with the HIGHEST version
* in the referenced operator sets.
*
* The OperatorSets this model relies on.
* All ModelProtos MUST have at least one entry that
* specifies which version of the ONNX OperatorSet is
* being imported.
* All nodes in the ModelProto's graph will bind against the operator
* with the same-domain/same-op_type operator with the HIGHEST version
* in the referenced operator sets.
*
* The OperatorSets this model relies on.
* All ModelProtos MUST have at least one entry that
* specifies which version of the ONNX OperatorSet is
* being imported.
* All nodes in the ModelProto's graph will bind against the operator
* with the same-domain/same-op_type operator with the HIGHEST version
* in the referenced operator sets.
*
* The OperatorSets this model relies on.
* All ModelProtos MUST have at least one entry that
* specifies which version of the ONNX OperatorSet is
* being imported.
* All nodes in the ModelProto's graph will bind against the operator
* with the same-domain/same-op_type operator with the HIGHEST version
* in the referenced operator sets.
*
* The name of the framework or tool used to generate this model.
* This field SHOULD be present to indicate which implementation/tool/framework
* emitted the model.
*
* The name of the framework or tool used to generate this model.
* This field SHOULD be present to indicate which implementation/tool/framework
* emitted the model.
*
* The version of the framework or tool used to generate this model.
* This field SHOULD be present to indicate which implementation/tool/framework
* emitted the model.
*
* The version of the framework or tool used to generate this model.
* This field SHOULD be present to indicate which implementation/tool/framework
* emitted the model.
*
* Domain name of the model.
* We use reverse domain names as name space indicators. For example:
* `com.facebook.fair` or `com.microsoft.cognitiveservices`
* Together with `model_version` and GraphProto.name, this forms the unique identity of
* the graph.
*
* Domain name of the model.
* We use reverse domain names as name space indicators. For example:
* `com.facebook.fair` or `com.microsoft.cognitiveservices`
* Together with `model_version` and GraphProto.name, this forms the unique identity of
* the graph.
*
* ModelProto is a top-level file/container format for bundling a ML model.
* The semantics of the model are described by the GraphProto that represents
* a parameterized computation graph against a set of named operators that are
* defined independently from the graph.
*
*
* Protobuf type {@code onnx.ModelProto}
*/
public static final class ModelProto extends
org.nd4j.shade.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:onnx.ModelProto)
ModelProtoOrBuilder {
private static final long serialVersionUID = 0L;
// Use ModelProto.newBuilder() to construct.
private ModelProto(org.nd4j.shade.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ModelProto() {
irVersion_ = 0L;
opsetImport_ = java.util.Collections.emptyList();
producerName_ = "";
producerVersion_ = "";
domain_ = "";
modelVersion_ = 0L;
docString_ = "";
metadataProps_ = java.util.Collections.emptyList();
}
@java.lang.Override
public final org.nd4j.shade.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private ModelProto(
org.nd4j.shade.protobuf.CodedInputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
org.nd4j.shade.protobuf.UnknownFieldSet.Builder unknownFields =
org.nd4j.shade.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
case 8: {
irVersion_ = input.readInt64();
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
producerName_ = s;
break;
}
case 26: {
java.lang.String s = input.readStringRequireUtf8();
producerVersion_ = s;
break;
}
case 34: {
java.lang.String s = input.readStringRequireUtf8();
domain_ = s;
break;
}
case 40: {
modelVersion_ = input.readInt64();
break;
}
case 50: {
java.lang.String s = input.readStringRequireUtf8();
docString_ = s;
break;
}
case 58: {
onnx.Onnx.GraphProto.Builder subBuilder = null;
if (graph_ != null) {
subBuilder = graph_.toBuilder();
}
graph_ = input.readMessage(onnx.Onnx.GraphProto.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(graph_);
graph_ = subBuilder.buildPartial();
}
break;
}
case 66: {
if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
opsetImport_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000002;
}
opsetImport_.add(
input.readMessage(onnx.Onnx.OperatorSetIdProto.parser(), extensionRegistry));
break;
}
case 114: {
if (!((mutable_bitField0_ & 0x00000100) == 0x00000100)) {
metadataProps_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000100;
}
metadataProps_.add(
input.readMessage(onnx.Onnx.StringStringEntryProto.parser(), extensionRegistry));
break;
}
}
}
} catch (org.nd4j.shade.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new org.nd4j.shade.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
opsetImport_ = java.util.Collections.unmodifiableList(opsetImport_);
}
if (((mutable_bitField0_ & 0x00000100) == 0x00000100)) {
metadataProps_ = java.util.Collections.unmodifiableList(metadataProps_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final org.nd4j.shade.protobuf.Descriptors.Descriptor
getDescriptor() {
return onnx.Onnx.internal_static_onnx_ModelProto_descriptor;
}
protected org.nd4j.shade.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return onnx.Onnx.internal_static_onnx_ModelProto_fieldAccessorTable
.ensureFieldAccessorsInitialized(
onnx.Onnx.ModelProto.class, onnx.Onnx.ModelProto.Builder.class);
}
private int bitField0_;
public static final int IR_VERSION_FIELD_NUMBER = 1;
private long irVersion_;
/**
*
* The version of the IR this model targets. See Version enum above.
* This field MUST be present.
*
*
* int64 ir_version = 1;
*/
public long getIrVersion() {
return irVersion_;
}
public static final int OPSET_IMPORT_FIELD_NUMBER = 8;
private java.util.List opsetImport_;
/**
*
* The OperatorSets this model relies on.
* All ModelProtos MUST have at least one entry that
* specifies which version of the ONNX OperatorSet is
* being imported.
* All nodes in the ModelProto's graph will bind against the operator
* with the same-domain/same-op_type operator with the HIGHEST version
* in the referenced operator sets.
*
* The OperatorSets this model relies on.
* All ModelProtos MUST have at least one entry that
* specifies which version of the ONNX OperatorSet is
* being imported.
* All nodes in the ModelProto's graph will bind against the operator
* with the same-domain/same-op_type operator with the HIGHEST version
* in the referenced operator sets.
*
* The OperatorSets this model relies on.
* All ModelProtos MUST have at least one entry that
* specifies which version of the ONNX OperatorSet is
* being imported.
* All nodes in the ModelProto's graph will bind against the operator
* with the same-domain/same-op_type operator with the HIGHEST version
* in the referenced operator sets.
*
*
* repeated .onnx.OperatorSetIdProto opset_import = 8;
*/
public int getOpsetImportCount() {
return opsetImport_.size();
}
/**
*
* The OperatorSets this model relies on.
* All ModelProtos MUST have at least one entry that
* specifies which version of the ONNX OperatorSet is
* being imported.
* All nodes in the ModelProto's graph will bind against the operator
* with the same-domain/same-op_type operator with the HIGHEST version
* in the referenced operator sets.
*
* The OperatorSets this model relies on.
* All ModelProtos MUST have at least one entry that
* specifies which version of the ONNX OperatorSet is
* being imported.
* All nodes in the ModelProto's graph will bind against the operator
* with the same-domain/same-op_type operator with the HIGHEST version
* in the referenced operator sets.
*
*
* repeated .onnx.OperatorSetIdProto opset_import = 8;
*/
public onnx.Onnx.OperatorSetIdProtoOrBuilder getOpsetImportOrBuilder(
int index) {
return opsetImport_.get(index);
}
public static final int PRODUCER_NAME_FIELD_NUMBER = 2;
private volatile java.lang.Object producerName_;
/**
*
* The name of the framework or tool used to generate this model.
* This field SHOULD be present to indicate which implementation/tool/framework
* emitted the model.
*
* The name of the framework or tool used to generate this model.
* This field SHOULD be present to indicate which implementation/tool/framework
* emitted the model.
*
*
* string producer_name = 2;
*/
public org.nd4j.shade.protobuf.ByteString
getProducerNameBytes() {
java.lang.Object ref = producerName_;
if (ref instanceof java.lang.String) {
org.nd4j.shade.protobuf.ByteString b =
org.nd4j.shade.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
producerName_ = b;
return b;
} else {
return (org.nd4j.shade.protobuf.ByteString) ref;
}
}
public static final int PRODUCER_VERSION_FIELD_NUMBER = 3;
private volatile java.lang.Object producerVersion_;
/**
*
* The version of the framework or tool used to generate this model.
* This field SHOULD be present to indicate which implementation/tool/framework
* emitted the model.
*
* The version of the framework or tool used to generate this model.
* This field SHOULD be present to indicate which implementation/tool/framework
* emitted the model.
*
*
* string producer_version = 3;
*/
public org.nd4j.shade.protobuf.ByteString
getProducerVersionBytes() {
java.lang.Object ref = producerVersion_;
if (ref instanceof java.lang.String) {
org.nd4j.shade.protobuf.ByteString b =
org.nd4j.shade.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
producerVersion_ = b;
return b;
} else {
return (org.nd4j.shade.protobuf.ByteString) ref;
}
}
public static final int DOMAIN_FIELD_NUMBER = 4;
private volatile java.lang.Object domain_;
/**
*
* Domain name of the model.
* We use reverse domain names as name space indicators. For example:
* `com.facebook.fair` or `com.microsoft.cognitiveservices`
* Together with `model_version` and GraphProto.name, this forms the unique identity of
* the graph.
*
* Domain name of the model.
* We use reverse domain names as name space indicators. For example:
* `com.facebook.fair` or `com.microsoft.cognitiveservices`
* Together with `model_version` and GraphProto.name, this forms the unique identity of
* the graph.
*
*
* string domain = 4;
*/
public org.nd4j.shade.protobuf.ByteString
getDomainBytes() {
java.lang.Object ref = domain_;
if (ref instanceof java.lang.String) {
org.nd4j.shade.protobuf.ByteString b =
org.nd4j.shade.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
domain_ = b;
return b;
} else {
return (org.nd4j.shade.protobuf.ByteString) ref;
}
}
public static final int MODEL_VERSION_FIELD_NUMBER = 5;
private long modelVersion_;
/**
*
* The version of the graph encoded. See Version enum below.
*
*
* int64 model_version = 5;
*/
public long getModelVersion() {
return modelVersion_;
}
public static final int DOC_STRING_FIELD_NUMBER = 6;
private volatile java.lang.Object docString_;
/**
*
* A human-readable documentation for this model. Markdown is allowed.
*
* Named metadata values; keys should be distinct.
*
*
* repeated .onnx.StringStringEntryProto metadata_props = 14;
*/
public onnx.Onnx.StringStringEntryProtoOrBuilder getMetadataPropsOrBuilder(
int index) {
return metadataProps_.get(index);
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(org.nd4j.shade.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (irVersion_ != 0L) {
output.writeInt64(1, irVersion_);
}
if (!getProducerNameBytes().isEmpty()) {
org.nd4j.shade.protobuf.GeneratedMessageV3.writeString(output, 2, producerName_);
}
if (!getProducerVersionBytes().isEmpty()) {
org.nd4j.shade.protobuf.GeneratedMessageV3.writeString(output, 3, producerVersion_);
}
if (!getDomainBytes().isEmpty()) {
org.nd4j.shade.protobuf.GeneratedMessageV3.writeString(output, 4, domain_);
}
if (modelVersion_ != 0L) {
output.writeInt64(5, modelVersion_);
}
if (!getDocStringBytes().isEmpty()) {
org.nd4j.shade.protobuf.GeneratedMessageV3.writeString(output, 6, docString_);
}
if (graph_ != null) {
output.writeMessage(7, getGraph());
}
for (int i = 0; i < opsetImport_.size(); i++) {
output.writeMessage(8, opsetImport_.get(i));
}
for (int i = 0; i < metadataProps_.size(); i++) {
output.writeMessage(14, metadataProps_.get(i));
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (irVersion_ != 0L) {
size += org.nd4j.shade.protobuf.CodedOutputStream
.computeInt64Size(1, irVersion_);
}
if (!getProducerNameBytes().isEmpty()) {
size += org.nd4j.shade.protobuf.GeneratedMessageV3.computeStringSize(2, producerName_);
}
if (!getProducerVersionBytes().isEmpty()) {
size += org.nd4j.shade.protobuf.GeneratedMessageV3.computeStringSize(3, producerVersion_);
}
if (!getDomainBytes().isEmpty()) {
size += org.nd4j.shade.protobuf.GeneratedMessageV3.computeStringSize(4, domain_);
}
if (modelVersion_ != 0L) {
size += org.nd4j.shade.protobuf.CodedOutputStream
.computeInt64Size(5, modelVersion_);
}
if (!getDocStringBytes().isEmpty()) {
size += org.nd4j.shade.protobuf.GeneratedMessageV3.computeStringSize(6, docString_);
}
if (graph_ != null) {
size += org.nd4j.shade.protobuf.CodedOutputStream
.computeMessageSize(7, getGraph());
}
for (int i = 0; i < opsetImport_.size(); i++) {
size += org.nd4j.shade.protobuf.CodedOutputStream
.computeMessageSize(8, opsetImport_.get(i));
}
for (int i = 0; i < metadataProps_.size(); i++) {
size += org.nd4j.shade.protobuf.CodedOutputStream
.computeMessageSize(14, metadataProps_.get(i));
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof onnx.Onnx.ModelProto)) {
return super.equals(obj);
}
onnx.Onnx.ModelProto other = (onnx.Onnx.ModelProto) obj;
boolean result = true;
result = result && (getIrVersion()
== other.getIrVersion());
result = result && getOpsetImportList()
.equals(other.getOpsetImportList());
result = result && getProducerName()
.equals(other.getProducerName());
result = result && getProducerVersion()
.equals(other.getProducerVersion());
result = result && getDomain()
.equals(other.getDomain());
result = result && (getModelVersion()
== other.getModelVersion());
result = result && getDocString()
.equals(other.getDocString());
result = result && (hasGraph() == other.hasGraph());
if (hasGraph()) {
result = result && getGraph()
.equals(other.getGraph());
}
result = result && getMetadataPropsList()
.equals(other.getMetadataPropsList());
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + IR_VERSION_FIELD_NUMBER;
hash = (53 * hash) + org.nd4j.shade.protobuf.Internal.hashLong(
getIrVersion());
if (getOpsetImportCount() > 0) {
hash = (37 * hash) + OPSET_IMPORT_FIELD_NUMBER;
hash = (53 * hash) + getOpsetImportList().hashCode();
}
hash = (37 * hash) + PRODUCER_NAME_FIELD_NUMBER;
hash = (53 * hash) + getProducerName().hashCode();
hash = (37 * hash) + PRODUCER_VERSION_FIELD_NUMBER;
hash = (53 * hash) + getProducerVersion().hashCode();
hash = (37 * hash) + DOMAIN_FIELD_NUMBER;
hash = (53 * hash) + getDomain().hashCode();
hash = (37 * hash) + MODEL_VERSION_FIELD_NUMBER;
hash = (53 * hash) + org.nd4j.shade.protobuf.Internal.hashLong(
getModelVersion());
hash = (37 * hash) + DOC_STRING_FIELD_NUMBER;
hash = (53 * hash) + getDocString().hashCode();
if (hasGraph()) {
hash = (37 * hash) + GRAPH_FIELD_NUMBER;
hash = (53 * hash) + getGraph().hashCode();
}
if (getMetadataPropsCount() > 0) {
hash = (37 * hash) + METADATA_PROPS_FIELD_NUMBER;
hash = (53 * hash) + getMetadataPropsList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static onnx.Onnx.ModelProto parseFrom(
java.nio.ByteBuffer data)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static onnx.Onnx.ModelProto parseFrom(
java.nio.ByteBuffer data,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static onnx.Onnx.ModelProto parseFrom(
org.nd4j.shade.protobuf.ByteString data)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static onnx.Onnx.ModelProto parseFrom(
org.nd4j.shade.protobuf.ByteString data,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static onnx.Onnx.ModelProto parseFrom(byte[] data)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static onnx.Onnx.ModelProto parseFrom(
byte[] data,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static onnx.Onnx.ModelProto parseFrom(java.io.InputStream input)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static onnx.Onnx.ModelProto parseFrom(
java.io.InputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static onnx.Onnx.ModelProto parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static onnx.Onnx.ModelProto parseDelimitedFrom(
java.io.InputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static onnx.Onnx.ModelProto parseFrom(
org.nd4j.shade.protobuf.CodedInputStream input)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static onnx.Onnx.ModelProto parseFrom(
org.nd4j.shade.protobuf.CodedInputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(onnx.Onnx.ModelProto prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
org.nd4j.shade.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* ModelProto is a top-level file/container format for bundling a ML model.
* The semantics of the model are described by the GraphProto that represents
* a parameterized computation graph against a set of named operators that are
* defined independently from the graph.
*
* The OperatorSets this model relies on.
* All ModelProtos MUST have at least one entry that
* specifies which version of the ONNX OperatorSet is
* being imported.
* All nodes in the ModelProto's graph will bind against the operator
* with the same-domain/same-op_type operator with the HIGHEST version
* in the referenced operator sets.
*
* The OperatorSets this model relies on.
* All ModelProtos MUST have at least one entry that
* specifies which version of the ONNX OperatorSet is
* being imported.
* All nodes in the ModelProto's graph will bind against the operator
* with the same-domain/same-op_type operator with the HIGHEST version
* in the referenced operator sets.
*
*
* repeated .onnx.OperatorSetIdProto opset_import = 8;
*/
public int getOpsetImportCount() {
if (opsetImportBuilder_ == null) {
return opsetImport_.size();
} else {
return opsetImportBuilder_.getCount();
}
}
/**
*
* The OperatorSets this model relies on.
* All ModelProtos MUST have at least one entry that
* specifies which version of the ONNX OperatorSet is
* being imported.
* All nodes in the ModelProto's graph will bind against the operator
* with the same-domain/same-op_type operator with the HIGHEST version
* in the referenced operator sets.
*
* The OperatorSets this model relies on.
* All ModelProtos MUST have at least one entry that
* specifies which version of the ONNX OperatorSet is
* being imported.
* All nodes in the ModelProto's graph will bind against the operator
* with the same-domain/same-op_type operator with the HIGHEST version
* in the referenced operator sets.
*
*
* repeated .onnx.OperatorSetIdProto opset_import = 8;
*/
public Builder setOpsetImport(
int index, onnx.Onnx.OperatorSetIdProto value) {
if (opsetImportBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureOpsetImportIsMutable();
opsetImport_.set(index, value);
onChanged();
} else {
opsetImportBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* The OperatorSets this model relies on.
* All ModelProtos MUST have at least one entry that
* specifies which version of the ONNX OperatorSet is
* being imported.
* All nodes in the ModelProto's graph will bind against the operator
* with the same-domain/same-op_type operator with the HIGHEST version
* in the referenced operator sets.
*
* The OperatorSets this model relies on.
* All ModelProtos MUST have at least one entry that
* specifies which version of the ONNX OperatorSet is
* being imported.
* All nodes in the ModelProto's graph will bind against the operator
* with the same-domain/same-op_type operator with the HIGHEST version
* in the referenced operator sets.
*
*
* repeated .onnx.OperatorSetIdProto opset_import = 8;
*/
public Builder addOpsetImport(onnx.Onnx.OperatorSetIdProto value) {
if (opsetImportBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureOpsetImportIsMutable();
opsetImport_.add(value);
onChanged();
} else {
opsetImportBuilder_.addMessage(value);
}
return this;
}
/**
*
* The OperatorSets this model relies on.
* All ModelProtos MUST have at least one entry that
* specifies which version of the ONNX OperatorSet is
* being imported.
* All nodes in the ModelProto's graph will bind against the operator
* with the same-domain/same-op_type operator with the HIGHEST version
* in the referenced operator sets.
*
*
* repeated .onnx.OperatorSetIdProto opset_import = 8;
*/
public Builder addOpsetImport(
int index, onnx.Onnx.OperatorSetIdProto value) {
if (opsetImportBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureOpsetImportIsMutable();
opsetImport_.add(index, value);
onChanged();
} else {
opsetImportBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* The OperatorSets this model relies on.
* All ModelProtos MUST have at least one entry that
* specifies which version of the ONNX OperatorSet is
* being imported.
* All nodes in the ModelProto's graph will bind against the operator
* with the same-domain/same-op_type operator with the HIGHEST version
* in the referenced operator sets.
*
* The OperatorSets this model relies on.
* All ModelProtos MUST have at least one entry that
* specifies which version of the ONNX OperatorSet is
* being imported.
* All nodes in the ModelProto's graph will bind against the operator
* with the same-domain/same-op_type operator with the HIGHEST version
* in the referenced operator sets.
*
* The OperatorSets this model relies on.
* All ModelProtos MUST have at least one entry that
* specifies which version of the ONNX OperatorSet is
* being imported.
* All nodes in the ModelProto's graph will bind against the operator
* with the same-domain/same-op_type operator with the HIGHEST version
* in the referenced operator sets.
*
* The OperatorSets this model relies on.
* All ModelProtos MUST have at least one entry that
* specifies which version of the ONNX OperatorSet is
* being imported.
* All nodes in the ModelProto's graph will bind against the operator
* with the same-domain/same-op_type operator with the HIGHEST version
* in the referenced operator sets.
*
* The OperatorSets this model relies on.
* All ModelProtos MUST have at least one entry that
* specifies which version of the ONNX OperatorSet is
* being imported.
* All nodes in the ModelProto's graph will bind against the operator
* with the same-domain/same-op_type operator with the HIGHEST version
* in the referenced operator sets.
*
* The OperatorSets this model relies on.
* All ModelProtos MUST have at least one entry that
* specifies which version of the ONNX OperatorSet is
* being imported.
* All nodes in the ModelProto's graph will bind against the operator
* with the same-domain/same-op_type operator with the HIGHEST version
* in the referenced operator sets.
*
*
* repeated .onnx.OperatorSetIdProto opset_import = 8;
*/
public onnx.Onnx.OperatorSetIdProto.Builder getOpsetImportBuilder(
int index) {
return getOpsetImportFieldBuilder().getBuilder(index);
}
/**
*
* The OperatorSets this model relies on.
* All ModelProtos MUST have at least one entry that
* specifies which version of the ONNX OperatorSet is
* being imported.
* All nodes in the ModelProto's graph will bind against the operator
* with the same-domain/same-op_type operator with the HIGHEST version
* in the referenced operator sets.
*
*
* repeated .onnx.OperatorSetIdProto opset_import = 8;
*/
public onnx.Onnx.OperatorSetIdProtoOrBuilder getOpsetImportOrBuilder(
int index) {
if (opsetImportBuilder_ == null) {
return opsetImport_.get(index); } else {
return opsetImportBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* The OperatorSets this model relies on.
* All ModelProtos MUST have at least one entry that
* specifies which version of the ONNX OperatorSet is
* being imported.
* All nodes in the ModelProto's graph will bind against the operator
* with the same-domain/same-op_type operator with the HIGHEST version
* in the referenced operator sets.
*
* The OperatorSets this model relies on.
* All ModelProtos MUST have at least one entry that
* specifies which version of the ONNX OperatorSet is
* being imported.
* All nodes in the ModelProto's graph will bind against the operator
* with the same-domain/same-op_type operator with the HIGHEST version
* in the referenced operator sets.
*
* The OperatorSets this model relies on.
* All ModelProtos MUST have at least one entry that
* specifies which version of the ONNX OperatorSet is
* being imported.
* All nodes in the ModelProto's graph will bind against the operator
* with the same-domain/same-op_type operator with the HIGHEST version
* in the referenced operator sets.
*
* The OperatorSets this model relies on.
* All ModelProtos MUST have at least one entry that
* specifies which version of the ONNX OperatorSet is
* being imported.
* All nodes in the ModelProto's graph will bind against the operator
* with the same-domain/same-op_type operator with the HIGHEST version
* in the referenced operator sets.
*
* The name of the framework or tool used to generate this model.
* This field SHOULD be present to indicate which implementation/tool/framework
* emitted the model.
*
* The name of the framework or tool used to generate this model.
* This field SHOULD be present to indicate which implementation/tool/framework
* emitted the model.
*
* The name of the framework or tool used to generate this model.
* This field SHOULD be present to indicate which implementation/tool/framework
* emitted the model.
*
* The name of the framework or tool used to generate this model.
* This field SHOULD be present to indicate which implementation/tool/framework
* emitted the model.
*
* The name of the framework or tool used to generate this model.
* This field SHOULD be present to indicate which implementation/tool/framework
* emitted the model.
*
* The version of the framework or tool used to generate this model.
* This field SHOULD be present to indicate which implementation/tool/framework
* emitted the model.
*
* The version of the framework or tool used to generate this model.
* This field SHOULD be present to indicate which implementation/tool/framework
* emitted the model.
*
* The version of the framework or tool used to generate this model.
* This field SHOULD be present to indicate which implementation/tool/framework
* emitted the model.
*
* The version of the framework or tool used to generate this model.
* This field SHOULD be present to indicate which implementation/tool/framework
* emitted the model.
*
* The version of the framework or tool used to generate this model.
* This field SHOULD be present to indicate which implementation/tool/framework
* emitted the model.
*
* Domain name of the model.
* We use reverse domain names as name space indicators. For example:
* `com.facebook.fair` or `com.microsoft.cognitiveservices`
* Together with `model_version` and GraphProto.name, this forms the unique identity of
* the graph.
*
* Domain name of the model.
* We use reverse domain names as name space indicators. For example:
* `com.facebook.fair` or `com.microsoft.cognitiveservices`
* Together with `model_version` and GraphProto.name, this forms the unique identity of
* the graph.
*
* Domain name of the model.
* We use reverse domain names as name space indicators. For example:
* `com.facebook.fair` or `com.microsoft.cognitiveservices`
* Together with `model_version` and GraphProto.name, this forms the unique identity of
* the graph.
*
* Domain name of the model.
* We use reverse domain names as name space indicators. For example:
* `com.facebook.fair` or `com.microsoft.cognitiveservices`
* Together with `model_version` and GraphProto.name, this forms the unique identity of
* the graph.
*
* Domain name of the model.
* We use reverse domain names as name space indicators. For example:
* `com.facebook.fair` or `com.microsoft.cognitiveservices`
* Together with `model_version` and GraphProto.name, this forms the unique identity of
* the graph.
*
*
* string domain = 4;
*/
public Builder setDomainBytes(
org.nd4j.shade.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
domain_ = value;
onChanged();
return this;
}
private long modelVersion_ ;
/**
*
* The version of the graph encoded. See Version enum below.
*
*
* int64 model_version = 5;
*/
public long getModelVersion() {
return modelVersion_;
}
/**
*
* The version of the graph encoded. See Version enum below.
*
* A list of named tensor values (constants), used to specify default
* values for some of the inputs of the graph.
* Each TensorProto entry must have a distinct name (within the list) that
* also appears in the input list.
* In an evaluation, the default value specified here is used if and only if
* user specifies no value for the corresponding input parameter.
* May be used to pass serialized parameters for networks.
*
* A list of named tensor values (constants), used to specify default
* values for some of the inputs of the graph.
* Each TensorProto entry must have a distinct name (within the list) that
* also appears in the input list.
* In an evaluation, the default value specified here is used if and only if
* user specifies no value for the corresponding input parameter.
* May be used to pass serialized parameters for networks.
*
* A list of named tensor values (constants), used to specify default
* values for some of the inputs of the graph.
* Each TensorProto entry must have a distinct name (within the list) that
* also appears in the input list.
* In an evaluation, the default value specified here is used if and only if
* user specifies no value for the corresponding input parameter.
* May be used to pass serialized parameters for networks.
*
* A list of named tensor values (constants), used to specify default
* values for some of the inputs of the graph.
* Each TensorProto entry must have a distinct name (within the list) that
* also appears in the input list.
* In an evaluation, the default value specified here is used if and only if
* user specifies no value for the corresponding input parameter.
* May be used to pass serialized parameters for networks.
*
* A list of named tensor values (constants), used to specify default
* values for some of the inputs of the graph.
* Each TensorProto entry must have a distinct name (within the list) that
* also appears in the input list.
* In an evaluation, the default value specified here is used if and only if
* user specifies no value for the corresponding input parameter.
* May be used to pass serialized parameters for networks.
*
* GraphProto defines a parameterized series of nodes to form a directed acyclic graph.
* This is the equivalent of the "network" and "graph" in many deep learning
* frameworks.
*
*
* Protobuf type {@code onnx.GraphProto}
*/
public static final class GraphProto extends
org.nd4j.shade.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:onnx.GraphProto)
GraphProtoOrBuilder {
private static final long serialVersionUID = 0L;
// Use GraphProto.newBuilder() to construct.
private GraphProto(org.nd4j.shade.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private GraphProto() {
node_ = java.util.Collections.emptyList();
name_ = "";
initializer_ = java.util.Collections.emptyList();
docString_ = "";
input_ = java.util.Collections.emptyList();
output_ = java.util.Collections.emptyList();
valueInfo_ = java.util.Collections.emptyList();
}
@java.lang.Override
public final org.nd4j.shade.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private GraphProto(
org.nd4j.shade.protobuf.CodedInputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
org.nd4j.shade.protobuf.UnknownFieldSet.Builder unknownFields =
org.nd4j.shade.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
case 10: {
if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
node_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
node_.add(
input.readMessage(onnx.Onnx.NodeProto.parser(), extensionRegistry));
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
name_ = s;
break;
}
case 42: {
if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
initializer_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000004;
}
initializer_.add(
input.readMessage(onnx.Onnx.TensorProto.parser(), extensionRegistry));
break;
}
case 82: {
java.lang.String s = input.readStringRequireUtf8();
docString_ = s;
break;
}
case 90: {
if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
input_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000010;
}
input_.add(
input.readMessage(onnx.Onnx.ValueInfoProto.parser(), extensionRegistry));
break;
}
case 98: {
if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) {
output_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000020;
}
output_.add(
input.readMessage(onnx.Onnx.ValueInfoProto.parser(), extensionRegistry));
break;
}
case 106: {
if (!((mutable_bitField0_ & 0x00000040) == 0x00000040)) {
valueInfo_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000040;
}
valueInfo_.add(
input.readMessage(onnx.Onnx.ValueInfoProto.parser(), extensionRegistry));
break;
}
}
}
} catch (org.nd4j.shade.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new org.nd4j.shade.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
node_ = java.util.Collections.unmodifiableList(node_);
}
if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
initializer_ = java.util.Collections.unmodifiableList(initializer_);
}
if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
input_ = java.util.Collections.unmodifiableList(input_);
}
if (((mutable_bitField0_ & 0x00000020) == 0x00000020)) {
output_ = java.util.Collections.unmodifiableList(output_);
}
if (((mutable_bitField0_ & 0x00000040) == 0x00000040)) {
valueInfo_ = java.util.Collections.unmodifiableList(valueInfo_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final org.nd4j.shade.protobuf.Descriptors.Descriptor
getDescriptor() {
return onnx.Onnx.internal_static_onnx_GraphProto_descriptor;
}
protected org.nd4j.shade.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return onnx.Onnx.internal_static_onnx_GraphProto_fieldAccessorTable
.ensureFieldAccessorsInitialized(
onnx.Onnx.GraphProto.class, onnx.Onnx.GraphProto.Builder.class);
}
private int bitField0_;
public static final int NODE_FIELD_NUMBER = 1;
private java.util.List node_;
/**
*
*
* string name = 2;
*/
public org.nd4j.shade.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
org.nd4j.shade.protobuf.ByteString b =
org.nd4j.shade.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (org.nd4j.shade.protobuf.ByteString) ref;
}
}
public static final int INITIALIZER_FIELD_NUMBER = 5;
private java.util.List initializer_;
/**
*
* A list of named tensor values (constants), used to specify default
* values for some of the inputs of the graph.
* Each TensorProto entry must have a distinct name (within the list) that
* also appears in the input list.
* In an evaluation, the default value specified here is used if and only if
* user specifies no value for the corresponding input parameter.
* May be used to pass serialized parameters for networks.
*
* A list of named tensor values (constants), used to specify default
* values for some of the inputs of the graph.
* Each TensorProto entry must have a distinct name (within the list) that
* also appears in the input list.
* In an evaluation, the default value specified here is used if and only if
* user specifies no value for the corresponding input parameter.
* May be used to pass serialized parameters for networks.
*
* A list of named tensor values (constants), used to specify default
* values for some of the inputs of the graph.
* Each TensorProto entry must have a distinct name (within the list) that
* also appears in the input list.
* In an evaluation, the default value specified here is used if and only if
* user specifies no value for the corresponding input parameter.
* May be used to pass serialized parameters for networks.
*
*
* repeated .onnx.TensorProto initializer = 5;
*/
public int getInitializerCount() {
return initializer_.size();
}
/**
*
* A list of named tensor values (constants), used to specify default
* values for some of the inputs of the graph.
* Each TensorProto entry must have a distinct name (within the list) that
* also appears in the input list.
* In an evaluation, the default value specified here is used if and only if
* user specifies no value for the corresponding input parameter.
* May be used to pass serialized parameters for networks.
*
* A list of named tensor values (constants), used to specify default
* values for some of the inputs of the graph.
* Each TensorProto entry must have a distinct name (within the list) that
* also appears in the input list.
* In an evaluation, the default value specified here is used if and only if
* user specifies no value for the corresponding input parameter.
* May be used to pass serialized parameters for networks.
*
*
* repeated .onnx.TensorProto initializer = 5;
*/
public onnx.Onnx.TensorProtoOrBuilder getInitializerOrBuilder(
int index) {
return initializer_.get(index);
}
public static final int DOC_STRING_FIELD_NUMBER = 10;
private volatile java.lang.Object docString_;
/**
*
* A human-readable documentation for this graph. Markdown is allowed.
*
* Information for the values in the graph. The ValueInfoProto.name's
* must be distinct. It is optional for a value to appear in value_info list.
*
*
* repeated .onnx.ValueInfoProto value_info = 13;
*/
public onnx.Onnx.ValueInfoProtoOrBuilder getValueInfoOrBuilder(
int index) {
return valueInfo_.get(index);
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(org.nd4j.shade.protobuf.CodedOutputStream output)
throws java.io.IOException {
for (int i = 0; i < node_.size(); i++) {
output.writeMessage(1, node_.get(i));
}
if (!getNameBytes().isEmpty()) {
org.nd4j.shade.protobuf.GeneratedMessageV3.writeString(output, 2, name_);
}
for (int i = 0; i < initializer_.size(); i++) {
output.writeMessage(5, initializer_.get(i));
}
if (!getDocStringBytes().isEmpty()) {
org.nd4j.shade.protobuf.GeneratedMessageV3.writeString(output, 10, docString_);
}
for (int i = 0; i < input_.size(); i++) {
output.writeMessage(11, input_.get(i));
}
for (int i = 0; i < output_.size(); i++) {
output.writeMessage(12, output_.get(i));
}
for (int i = 0; i < valueInfo_.size(); i++) {
output.writeMessage(13, valueInfo_.get(i));
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < node_.size(); i++) {
size += org.nd4j.shade.protobuf.CodedOutputStream
.computeMessageSize(1, node_.get(i));
}
if (!getNameBytes().isEmpty()) {
size += org.nd4j.shade.protobuf.GeneratedMessageV3.computeStringSize(2, name_);
}
for (int i = 0; i < initializer_.size(); i++) {
size += org.nd4j.shade.protobuf.CodedOutputStream
.computeMessageSize(5, initializer_.get(i));
}
if (!getDocStringBytes().isEmpty()) {
size += org.nd4j.shade.protobuf.GeneratedMessageV3.computeStringSize(10, docString_);
}
for (int i = 0; i < input_.size(); i++) {
size += org.nd4j.shade.protobuf.CodedOutputStream
.computeMessageSize(11, input_.get(i));
}
for (int i = 0; i < output_.size(); i++) {
size += org.nd4j.shade.protobuf.CodedOutputStream
.computeMessageSize(12, output_.get(i));
}
for (int i = 0; i < valueInfo_.size(); i++) {
size += org.nd4j.shade.protobuf.CodedOutputStream
.computeMessageSize(13, valueInfo_.get(i));
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof onnx.Onnx.GraphProto)) {
return super.equals(obj);
}
onnx.Onnx.GraphProto other = (onnx.Onnx.GraphProto) obj;
boolean result = true;
result = result && getNodeList()
.equals(other.getNodeList());
result = result && getName()
.equals(other.getName());
result = result && getInitializerList()
.equals(other.getInitializerList());
result = result && getDocString()
.equals(other.getDocString());
result = result && getInputList()
.equals(other.getInputList());
result = result && getOutputList()
.equals(other.getOutputList());
result = result && getValueInfoList()
.equals(other.getValueInfoList());
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (getNodeCount() > 0) {
hash = (37 * hash) + NODE_FIELD_NUMBER;
hash = (53 * hash) + getNodeList().hashCode();
}
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
if (getInitializerCount() > 0) {
hash = (37 * hash) + INITIALIZER_FIELD_NUMBER;
hash = (53 * hash) + getInitializerList().hashCode();
}
hash = (37 * hash) + DOC_STRING_FIELD_NUMBER;
hash = (53 * hash) + getDocString().hashCode();
if (getInputCount() > 0) {
hash = (37 * hash) + INPUT_FIELD_NUMBER;
hash = (53 * hash) + getInputList().hashCode();
}
if (getOutputCount() > 0) {
hash = (37 * hash) + OUTPUT_FIELD_NUMBER;
hash = (53 * hash) + getOutputList().hashCode();
}
if (getValueInfoCount() > 0) {
hash = (37 * hash) + VALUE_INFO_FIELD_NUMBER;
hash = (53 * hash) + getValueInfoList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static onnx.Onnx.GraphProto parseFrom(
java.nio.ByteBuffer data)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static onnx.Onnx.GraphProto parseFrom(
java.nio.ByteBuffer data,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static onnx.Onnx.GraphProto parseFrom(
org.nd4j.shade.protobuf.ByteString data)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static onnx.Onnx.GraphProto parseFrom(
org.nd4j.shade.protobuf.ByteString data,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static onnx.Onnx.GraphProto parseFrom(byte[] data)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static onnx.Onnx.GraphProto parseFrom(
byte[] data,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static onnx.Onnx.GraphProto parseFrom(java.io.InputStream input)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static onnx.Onnx.GraphProto parseFrom(
java.io.InputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static onnx.Onnx.GraphProto parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static onnx.Onnx.GraphProto parseDelimitedFrom(
java.io.InputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static onnx.Onnx.GraphProto parseFrom(
org.nd4j.shade.protobuf.CodedInputStream input)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static onnx.Onnx.GraphProto parseFrom(
org.nd4j.shade.protobuf.CodedInputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(onnx.Onnx.GraphProto prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
org.nd4j.shade.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* GraphProto defines a parameterized series of nodes to form a directed acyclic graph.
* This is the equivalent of the "network" and "graph" in many deep learning
* frameworks.
*
* A list of named tensor values (constants), used to specify default
* values for some of the inputs of the graph.
* Each TensorProto entry must have a distinct name (within the list) that
* also appears in the input list.
* In an evaluation, the default value specified here is used if and only if
* user specifies no value for the corresponding input parameter.
* May be used to pass serialized parameters for networks.
*
* A list of named tensor values (constants), used to specify default
* values for some of the inputs of the graph.
* Each TensorProto entry must have a distinct name (within the list) that
* also appears in the input list.
* In an evaluation, the default value specified here is used if and only if
* user specifies no value for the corresponding input parameter.
* May be used to pass serialized parameters for networks.
*
*
* repeated .onnx.TensorProto initializer = 5;
*/
public int getInitializerCount() {
if (initializerBuilder_ == null) {
return initializer_.size();
} else {
return initializerBuilder_.getCount();
}
}
/**
*
* A list of named tensor values (constants), used to specify default
* values for some of the inputs of the graph.
* Each TensorProto entry must have a distinct name (within the list) that
* also appears in the input list.
* In an evaluation, the default value specified here is used if and only if
* user specifies no value for the corresponding input parameter.
* May be used to pass serialized parameters for networks.
*
* A list of named tensor values (constants), used to specify default
* values for some of the inputs of the graph.
* Each TensorProto entry must have a distinct name (within the list) that
* also appears in the input list.
* In an evaluation, the default value specified here is used if and only if
* user specifies no value for the corresponding input parameter.
* May be used to pass serialized parameters for networks.
*
*
* repeated .onnx.TensorProto initializer = 5;
*/
public Builder setInitializer(
int index, onnx.Onnx.TensorProto value) {
if (initializerBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureInitializerIsMutable();
initializer_.set(index, value);
onChanged();
} else {
initializerBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* A list of named tensor values (constants), used to specify default
* values for some of the inputs of the graph.
* Each TensorProto entry must have a distinct name (within the list) that
* also appears in the input list.
* In an evaluation, the default value specified here is used if and only if
* user specifies no value for the corresponding input parameter.
* May be used to pass serialized parameters for networks.
*
* A list of named tensor values (constants), used to specify default
* values for some of the inputs of the graph.
* Each TensorProto entry must have a distinct name (within the list) that
* also appears in the input list.
* In an evaluation, the default value specified here is used if and only if
* user specifies no value for the corresponding input parameter.
* May be used to pass serialized parameters for networks.
*
*
* repeated .onnx.TensorProto initializer = 5;
*/
public Builder addInitializer(onnx.Onnx.TensorProto value) {
if (initializerBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureInitializerIsMutable();
initializer_.add(value);
onChanged();
} else {
initializerBuilder_.addMessage(value);
}
return this;
}
/**
*
* A list of named tensor values (constants), used to specify default
* values for some of the inputs of the graph.
* Each TensorProto entry must have a distinct name (within the list) that
* also appears in the input list.
* In an evaluation, the default value specified here is used if and only if
* user specifies no value for the corresponding input parameter.
* May be used to pass serialized parameters for networks.
*
*
* repeated .onnx.TensorProto initializer = 5;
*/
public Builder addInitializer(
int index, onnx.Onnx.TensorProto value) {
if (initializerBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureInitializerIsMutable();
initializer_.add(index, value);
onChanged();
} else {
initializerBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* A list of named tensor values (constants), used to specify default
* values for some of the inputs of the graph.
* Each TensorProto entry must have a distinct name (within the list) that
* also appears in the input list.
* In an evaluation, the default value specified here is used if and only if
* user specifies no value for the corresponding input parameter.
* May be used to pass serialized parameters for networks.
*
* A list of named tensor values (constants), used to specify default
* values for some of the inputs of the graph.
* Each TensorProto entry must have a distinct name (within the list) that
* also appears in the input list.
* In an evaluation, the default value specified here is used if and only if
* user specifies no value for the corresponding input parameter.
* May be used to pass serialized parameters for networks.
*
* A list of named tensor values (constants), used to specify default
* values for some of the inputs of the graph.
* Each TensorProto entry must have a distinct name (within the list) that
* also appears in the input list.
* In an evaluation, the default value specified here is used if and only if
* user specifies no value for the corresponding input parameter.
* May be used to pass serialized parameters for networks.
*
* A list of named tensor values (constants), used to specify default
* values for some of the inputs of the graph.
* Each TensorProto entry must have a distinct name (within the list) that
* also appears in the input list.
* In an evaluation, the default value specified here is used if and only if
* user specifies no value for the corresponding input parameter.
* May be used to pass serialized parameters for networks.
*
* A list of named tensor values (constants), used to specify default
* values for some of the inputs of the graph.
* Each TensorProto entry must have a distinct name (within the list) that
* also appears in the input list.
* In an evaluation, the default value specified here is used if and only if
* user specifies no value for the corresponding input parameter.
* May be used to pass serialized parameters for networks.
*
* A list of named tensor values (constants), used to specify default
* values for some of the inputs of the graph.
* Each TensorProto entry must have a distinct name (within the list) that
* also appears in the input list.
* In an evaluation, the default value specified here is used if and only if
* user specifies no value for the corresponding input parameter.
* May be used to pass serialized parameters for networks.
*
*
* repeated .onnx.TensorProto initializer = 5;
*/
public onnx.Onnx.TensorProto.Builder getInitializerBuilder(
int index) {
return getInitializerFieldBuilder().getBuilder(index);
}
/**
*
* A list of named tensor values (constants), used to specify default
* values for some of the inputs of the graph.
* Each TensorProto entry must have a distinct name (within the list) that
* also appears in the input list.
* In an evaluation, the default value specified here is used if and only if
* user specifies no value for the corresponding input parameter.
* May be used to pass serialized parameters for networks.
*
*
* repeated .onnx.TensorProto initializer = 5;
*/
public onnx.Onnx.TensorProtoOrBuilder getInitializerOrBuilder(
int index) {
if (initializerBuilder_ == null) {
return initializer_.get(index); } else {
return initializerBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* A list of named tensor values (constants), used to specify default
* values for some of the inputs of the graph.
* Each TensorProto entry must have a distinct name (within the list) that
* also appears in the input list.
* In an evaluation, the default value specified here is used if and only if
* user specifies no value for the corresponding input parameter.
* May be used to pass serialized parameters for networks.
*
* A list of named tensor values (constants), used to specify default
* values for some of the inputs of the graph.
* Each TensorProto entry must have a distinct name (within the list) that
* also appears in the input list.
* In an evaluation, the default value specified here is used if and only if
* user specifies no value for the corresponding input parameter.
* May be used to pass serialized parameters for networks.
*
* A list of named tensor values (constants), used to specify default
* values for some of the inputs of the graph.
* Each TensorProto entry must have a distinct name (within the list) that
* also appears in the input list.
* In an evaluation, the default value specified here is used if and only if
* user specifies no value for the corresponding input parameter.
* May be used to pass serialized parameters for networks.
*
* A list of named tensor values (constants), used to specify default
* values for some of the inputs of the graph.
* Each TensorProto entry must have a distinct name (within the list) that
* also appears in the input list.
* In an evaluation, the default value specified here is used if and only if
* user specifies no value for the corresponding input parameter.
* May be used to pass serialized parameters for networks.
*
* For float and complex64 values
* Complex64 tensors are encoded as a single array of floats,
* with the real components appearing in odd numbered positions,
* and the corresponding imaginary component apparing in the
* subsequent even numbered position. (e.g., [1.0 + 2.0i, 3.0 + 4.0i]
* is encoded as [1.0, 2.0 ,3.0 ,4.0]
* When this field is present, the data_type field MUST be FLOAT or COMPLEX64.
*
* For float and complex64 values
* Complex64 tensors are encoded as a single array of floats,
* with the real components appearing in odd numbered positions,
* and the corresponding imaginary component apparing in the
* subsequent even numbered position. (e.g., [1.0 + 2.0i, 3.0 + 4.0i]
* is encoded as [1.0, 2.0 ,3.0 ,4.0]
* When this field is present, the data_type field MUST be FLOAT or COMPLEX64.
*
* For float and complex64 values
* Complex64 tensors are encoded as a single array of floats,
* with the real components appearing in odd numbered positions,
* and the corresponding imaginary component apparing in the
* subsequent even numbered position. (e.g., [1.0 + 2.0i, 3.0 + 4.0i]
* is encoded as [1.0, 2.0 ,3.0 ,4.0]
* When this field is present, the data_type field MUST be FLOAT or COMPLEX64.
*
* For int32, uint8, int8, uint16, int16, bool, and float16 values
* float16 values must be bit-wise converted to an uint16_t prior
* to writing to the buffer.
* When this field is present, the data_type field MUST be
* INT32, INT16, INT8, UINT16, INT8, BOOL, or FLOAT32
*
* For int32, uint8, int8, uint16, int16, bool, and float16 values
* float16 values must be bit-wise converted to an uint16_t prior
* to writing to the buffer.
* When this field is present, the data_type field MUST be
* INT32, INT16, INT8, UINT16, INT8, BOOL, or FLOAT32
*
* For int32, uint8, int8, uint16, int16, bool, and float16 values
* float16 values must be bit-wise converted to an uint16_t prior
* to writing to the buffer.
* When this field is present, the data_type field MUST be
* INT32, INT16, INT8, UINT16, INT8, BOOL, or FLOAT32
*
* For strings.
* Each element of string_data is a UTF-8 encoded Unicode
* string. No trailing null, no leading BOM. The protobuf "string"
* scalar type is not used to match ML community conventions.
* When this field is present, the data_type field MUST be STRING
*
* For strings.
* Each element of string_data is a UTF-8 encoded Unicode
* string. No trailing null, no leading BOM. The protobuf "string"
* scalar type is not used to match ML community conventions.
* When this field is present, the data_type field MUST be STRING
*
* For strings.
* Each element of string_data is a UTF-8 encoded Unicode
* string. No trailing null, no leading BOM. The protobuf "string"
* scalar type is not used to match ML community conventions.
* When this field is present, the data_type field MUST be STRING
*
* Serializations can either use one of the fields above, or use this
* raw bytes field. The only exception is the string case, where one is
* required to store the content in the repeated bytes string_data field.
* When this raw_data field is used to store tensor value, elements MUST
* be stored in as fixed-width, little-endian order.
* Floating-point data types MUST be stored in IEEE 754 format.
* Complex64 elements must be written as two consecutive FLOAT values, real component first.
* Complex128 elements must be written as two consecutive DOUBLE values, real component first.
* Boolean type MUST be written one byte per tensor element (00000001 for true, 00000000 for false).
* Note: the advantage of specific field rather than the raw_data field is
* that in some cases (e.g. int data), protobuf does a better packing via
* variable length storage, and may lead to smaller binary footprint.
* When this field is present, the data_type field MUST NOT be STRING or UNDEFINED
*
* For double
* Complex64 tensors are encoded as a single array of doubles,
* with the real components appearing in odd numbered positions,
* and the corresponding imaginary component apparing in the
* subsequent even numbered position. (e.g., [1.0 + 2.0i, 3.0 + 4.0i]
* is encoded as [1.0, 2.0 ,3.0 ,4.0]
* When this field is present, the data_type field MUST be DOUBLE or COMPLEX128
*
* For double
* Complex64 tensors are encoded as a single array of doubles,
* with the real components appearing in odd numbered positions,
* and the corresponding imaginary component apparing in the
* subsequent even numbered position. (e.g., [1.0 + 2.0i, 3.0 + 4.0i]
* is encoded as [1.0, 2.0 ,3.0 ,4.0]
* When this field is present, the data_type field MUST be DOUBLE or COMPLEX128
*
* For double
* Complex64 tensors are encoded as a single array of doubles,
* with the real components appearing in odd numbered positions,
* and the corresponding imaginary component apparing in the
* subsequent even numbered position. (e.g., [1.0 + 2.0i, 3.0 + 4.0i]
* is encoded as [1.0, 2.0 ,3.0 ,4.0]
* When this field is present, the data_type field MUST be DOUBLE or COMPLEX128
*
* complex with float32 real and imaginary components
*
*
* COMPLEX64 = 14;
*/
COMPLEX64(14),
/**
*
* complex with float64 real and imaginary components
*
*
* COMPLEX128 = 15;
*/
COMPLEX128(15),
UNRECOGNIZED(-1),
;
/**
* UNDEFINED = 0;
*/
public static final int UNDEFINED_VALUE = 0;
/**
*
* Basic types.
*
*
* FLOAT = 1;
*/
public static final int FLOAT_VALUE = 1;
/**
*
* uint8_t
*
*
* UINT8 = 2;
*/
public static final int UINT8_VALUE = 2;
/**
*
* int8_t
*
*
* INT8 = 3;
*/
public static final int INT8_VALUE = 3;
/**
*
* uint16_t
*
*
* UINT16 = 4;
*/
public static final int UINT16_VALUE = 4;
/**
*
* int16_t
*
*
* INT16 = 5;
*/
public static final int INT16_VALUE = 5;
/**
*
* int32_t
*
*
* INT32 = 6;
*/
public static final int INT32_VALUE = 6;
/**
*
* int64_t
*
*
* INT64 = 7;
*/
public static final int INT64_VALUE = 7;
/**
*
* string
*
*
* STRING = 8;
*/
public static final int STRING_VALUE = 8;
/**
*
* bool
*
*
* BOOL = 9;
*/
public static final int BOOL_VALUE = 9;
/**
*
* Advanced types
*
*
* FLOAT16 = 10;
*/
public static final int FLOAT16_VALUE = 10;
/**
* DOUBLE = 11;
*/
public static final int DOUBLE_VALUE = 11;
/**
* UINT32 = 12;
*/
public static final int UINT32_VALUE = 12;
/**
* UINT64 = 13;
*/
public static final int UINT64_VALUE = 13;
/**
*
* complex with float32 real and imaginary components
*
*
* COMPLEX64 = 14;
*/
public static final int COMPLEX64_VALUE = 14;
/**
*
* complex with float64 real and imaginary components
*
*
* COMPLEX128 = 15;
*/
public static final int COMPLEX128_VALUE = 15;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static DataType valueOf(int value) {
return forNumber(value);
}
public static DataType forNumber(int value) {
switch (value) {
case 0: return UNDEFINED;
case 1: return FLOAT;
case 2: return UINT8;
case 3: return INT8;
case 4: return UINT16;
case 5: return INT16;
case 6: return INT32;
case 7: return INT64;
case 8: return STRING;
case 9: return BOOL;
case 10: return FLOAT16;
case 11: return DOUBLE;
case 12: return UINT32;
case 13: return UINT64;
case 14: return COMPLEX64;
case 15: return COMPLEX128;
default: return null;
}
}
public static org.nd4j.shade.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final org.nd4j.shade.protobuf.Internal.EnumLiteMap<
DataType> internalValueMap =
new org.nd4j.shade.protobuf.Internal.EnumLiteMap() {
public DataType findValueByNumber(int number) {
return DataType.forNumber(number);
}
};
public final org.nd4j.shade.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
return getDescriptor().getValues().get(ordinal());
}
public final org.nd4j.shade.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final org.nd4j.shade.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return onnx.Onnx.TensorProto.getDescriptor().getEnumTypes().get(0);
}
private static final DataType[] VALUES = values();
public static DataType valueOf(
org.nd4j.shade.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private DataType(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:onnx.TensorProto.DataType)
}
public interface SegmentOrBuilder extends
// @@protoc_insertion_point(interface_extends:onnx.TensorProto.Segment)
org.nd4j.shade.protobuf.MessageOrBuilder {
/**
* int64 begin = 1;
*/
long getBegin();
/**
* int64 end = 2;
*/
long getEnd();
}
/**
*
* For very large tensors, we may want to store them in chunks, in which
* case the following fields will specify the segment that is stored in
* the current TensorProto.
*
*
* Protobuf type {@code onnx.TensorProto.Segment}
*/
public static final class Segment extends
org.nd4j.shade.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:onnx.TensorProto.Segment)
SegmentOrBuilder {
private static final long serialVersionUID = 0L;
// Use Segment.newBuilder() to construct.
private Segment(org.nd4j.shade.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Segment() {
begin_ = 0L;
end_ = 0L;
}
@java.lang.Override
public final org.nd4j.shade.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Segment(
org.nd4j.shade.protobuf.CodedInputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
org.nd4j.shade.protobuf.UnknownFieldSet.Builder unknownFields =
org.nd4j.shade.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
case 8: {
begin_ = input.readInt64();
break;
}
case 16: {
end_ = input.readInt64();
break;
}
}
}
} catch (org.nd4j.shade.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new org.nd4j.shade.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final org.nd4j.shade.protobuf.Descriptors.Descriptor
getDescriptor() {
return onnx.Onnx.internal_static_onnx_TensorProto_Segment_descriptor;
}
protected org.nd4j.shade.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return onnx.Onnx.internal_static_onnx_TensorProto_Segment_fieldAccessorTable
.ensureFieldAccessorsInitialized(
onnx.Onnx.TensorProto.Segment.class, onnx.Onnx.TensorProto.Segment.Builder.class);
}
public static final int BEGIN_FIELD_NUMBER = 1;
private long begin_;
/**
* int64 begin = 1;
*/
public long getBegin() {
return begin_;
}
public static final int END_FIELD_NUMBER = 2;
private long end_;
/**
* int64 end = 2;
*/
public long getEnd() {
return end_;
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(org.nd4j.shade.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (begin_ != 0L) {
output.writeInt64(1, begin_);
}
if (end_ != 0L) {
output.writeInt64(2, end_);
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (begin_ != 0L) {
size += org.nd4j.shade.protobuf.CodedOutputStream
.computeInt64Size(1, begin_);
}
if (end_ != 0L) {
size += org.nd4j.shade.protobuf.CodedOutputStream
.computeInt64Size(2, end_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof onnx.Onnx.TensorProto.Segment)) {
return super.equals(obj);
}
onnx.Onnx.TensorProto.Segment other = (onnx.Onnx.TensorProto.Segment) obj;
boolean result = true;
result = result && (getBegin()
== other.getBegin());
result = result && (getEnd()
== other.getEnd());
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + BEGIN_FIELD_NUMBER;
hash = (53 * hash) + org.nd4j.shade.protobuf.Internal.hashLong(
getBegin());
hash = (37 * hash) + END_FIELD_NUMBER;
hash = (53 * hash) + org.nd4j.shade.protobuf.Internal.hashLong(
getEnd());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static onnx.Onnx.TensorProto.Segment parseFrom(
java.nio.ByteBuffer data)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static onnx.Onnx.TensorProto.Segment parseFrom(
java.nio.ByteBuffer data,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static onnx.Onnx.TensorProto.Segment parseFrom(
org.nd4j.shade.protobuf.ByteString data)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static onnx.Onnx.TensorProto.Segment parseFrom(
org.nd4j.shade.protobuf.ByteString data,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static onnx.Onnx.TensorProto.Segment parseFrom(byte[] data)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static onnx.Onnx.TensorProto.Segment parseFrom(
byte[] data,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static onnx.Onnx.TensorProto.Segment parseFrom(java.io.InputStream input)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static onnx.Onnx.TensorProto.Segment parseFrom(
java.io.InputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static onnx.Onnx.TensorProto.Segment parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static onnx.Onnx.TensorProto.Segment parseDelimitedFrom(
java.io.InputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static onnx.Onnx.TensorProto.Segment parseFrom(
org.nd4j.shade.protobuf.CodedInputStream input)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static onnx.Onnx.TensorProto.Segment parseFrom(
org.nd4j.shade.protobuf.CodedInputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(onnx.Onnx.TensorProto.Segment prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
org.nd4j.shade.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* For very large tensors, we may want to store them in chunks, in which
* case the following fields will specify the segment that is stored in
* the current TensorProto.
*
*
* Protobuf type {@code onnx.TensorProto.Segment}
*/
public static final class Builder extends
org.nd4j.shade.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:onnx.TensorProto.Segment)
onnx.Onnx.TensorProto.SegmentOrBuilder {
public static final org.nd4j.shade.protobuf.Descriptors.Descriptor
getDescriptor() {
return onnx.Onnx.internal_static_onnx_TensorProto_Segment_descriptor;
}
protected org.nd4j.shade.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return onnx.Onnx.internal_static_onnx_TensorProto_Segment_fieldAccessorTable
.ensureFieldAccessorsInitialized(
onnx.Onnx.TensorProto.Segment.class, onnx.Onnx.TensorProto.Segment.Builder.class);
}
// Construct using onnx.Onnx.TensorProto.Segment.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
org.nd4j.shade.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (org.nd4j.shade.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
begin_ = 0L;
end_ = 0L;
return this;
}
public org.nd4j.shade.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return onnx.Onnx.internal_static_onnx_TensorProto_Segment_descriptor;
}
public onnx.Onnx.TensorProto.Segment getDefaultInstanceForType() {
return onnx.Onnx.TensorProto.Segment.getDefaultInstance();
}
public onnx.Onnx.TensorProto.Segment build() {
onnx.Onnx.TensorProto.Segment result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public onnx.Onnx.TensorProto.Segment buildPartial() {
onnx.Onnx.TensorProto.Segment result = new onnx.Onnx.TensorProto.Segment(this);
result.begin_ = begin_;
result.end_ = end_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
org.nd4j.shade.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
org.nd4j.shade.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
org.nd4j.shade.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
org.nd4j.shade.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
org.nd4j.shade.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(org.nd4j.shade.protobuf.Message other) {
if (other instanceof onnx.Onnx.TensorProto.Segment) {
return mergeFrom((onnx.Onnx.TensorProto.Segment)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(onnx.Onnx.TensorProto.Segment other) {
if (other == onnx.Onnx.TensorProto.Segment.getDefaultInstance()) return this;
if (other.getBegin() != 0L) {
setBegin(other.getBegin());
}
if (other.getEnd() != 0L) {
setEnd(other.getEnd());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
org.nd4j.shade.protobuf.CodedInputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
onnx.Onnx.TensorProto.Segment parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (org.nd4j.shade.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (onnx.Onnx.TensorProto.Segment) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private long begin_ ;
/**
* int64 begin = 1;
*/
public long getBegin() {
return begin_;
}
/**
* int64 begin = 1;
*/
public Builder setBegin(long value) {
begin_ = value;
onChanged();
return this;
}
/**
* int64 begin = 1;
*/
public Builder clearBegin() {
begin_ = 0L;
onChanged();
return this;
}
private long end_ ;
/**
* int64 end = 2;
*/
public long getEnd() {
return end_;
}
/**
* int64 end = 2;
*/
public Builder setEnd(long value) {
end_ = value;
onChanged();
return this;
}
/**
* int64 end = 2;
*/
public Builder clearEnd() {
end_ = 0L;
onChanged();
return this;
}
public final Builder setUnknownFields(
final org.nd4j.shade.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(unknownFields);
}
public final Builder mergeUnknownFields(
final org.nd4j.shade.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:onnx.TensorProto.Segment)
}
// @@protoc_insertion_point(class_scope:onnx.TensorProto.Segment)
private static final onnx.Onnx.TensorProto.Segment DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new onnx.Onnx.TensorProto.Segment();
}
public static onnx.Onnx.TensorProto.Segment getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final org.nd4j.shade.protobuf.Parser
PARSER = new org.nd4j.shade.protobuf.AbstractParser() {
public Segment parsePartialFrom(
org.nd4j.shade.protobuf.CodedInputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return new Segment(input, extensionRegistry);
}
};
public static org.nd4j.shade.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public org.nd4j.shade.protobuf.Parser getParserForType() {
return PARSER;
}
public onnx.Onnx.TensorProto.Segment getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private int bitField0_;
public static final int DIMS_FIELD_NUMBER = 1;
private java.util.List dims_;
/**
*
*
* repeated int64 dims = 1;
*/
public int getDimsCount() {
return dims_.size();
}
/**
*
* The shape of the tensor.
*
*
* repeated int64 dims = 1;
*/
public long getDims(int index) {
return dims_.get(index);
}
private int dimsMemoizedSerializedSize = -1;
public static final int DATA_TYPE_FIELD_NUMBER = 2;
private int dataType_;
/**
*
* The data type of the tensor.
*
*
* .onnx.TensorProto.DataType data_type = 2;
*/
public int getDataTypeValue() {
return dataType_;
}
/**
*
* The data type of the tensor.
*
*
* .onnx.TensorProto.DataType data_type = 2;
*/
public onnx.Onnx.TensorProto.DataType getDataType() {
onnx.Onnx.TensorProto.DataType result = onnx.Onnx.TensorProto.DataType.valueOf(dataType_);
return result == null ? onnx.Onnx.TensorProto.DataType.UNRECOGNIZED : result;
}
public static final int SEGMENT_FIELD_NUMBER = 3;
private onnx.Onnx.TensorProto.Segment segment_;
/**
* .onnx.TensorProto.Segment segment = 3;
*/
public boolean hasSegment() {
return segment_ != null;
}
/**
* .onnx.TensorProto.Segment segment = 3;
*/
public onnx.Onnx.TensorProto.Segment getSegment() {
return segment_ == null ? onnx.Onnx.TensorProto.Segment.getDefaultInstance() : segment_;
}
/**
* .onnx.TensorProto.Segment segment = 3;
*/
public onnx.Onnx.TensorProto.SegmentOrBuilder getSegmentOrBuilder() {
return getSegment();
}
public static final int FLOAT_DATA_FIELD_NUMBER = 4;
private java.util.List floatData_;
/**
*
* For float and complex64 values
* Complex64 tensors are encoded as a single array of floats,
* with the real components appearing in odd numbered positions,
* and the corresponding imaginary component apparing in the
* subsequent even numbered position. (e.g., [1.0 + 2.0i, 3.0 + 4.0i]
* is encoded as [1.0, 2.0 ,3.0 ,4.0]
* When this field is present, the data_type field MUST be FLOAT or COMPLEX64.
*
* For float and complex64 values
* Complex64 tensors are encoded as a single array of floats,
* with the real components appearing in odd numbered positions,
* and the corresponding imaginary component apparing in the
* subsequent even numbered position. (e.g., [1.0 + 2.0i, 3.0 + 4.0i]
* is encoded as [1.0, 2.0 ,3.0 ,4.0]
* When this field is present, the data_type field MUST be FLOAT or COMPLEX64.
*
*
* repeated float float_data = 4 [packed = true];
*/
public int getFloatDataCount() {
return floatData_.size();
}
/**
*
* For float and complex64 values
* Complex64 tensors are encoded as a single array of floats,
* with the real components appearing in odd numbered positions,
* and the corresponding imaginary component apparing in the
* subsequent even numbered position. (e.g., [1.0 + 2.0i, 3.0 + 4.0i]
* is encoded as [1.0, 2.0 ,3.0 ,4.0]
* When this field is present, the data_type field MUST be FLOAT or COMPLEX64.
*
*
* repeated float float_data = 4 [packed = true];
*/
public float getFloatData(int index) {
return floatData_.get(index);
}
private int floatDataMemoizedSerializedSize = -1;
public static final int INT32_DATA_FIELD_NUMBER = 5;
private java.util.List int32Data_;
/**
*
* For int32, uint8, int8, uint16, int16, bool, and float16 values
* float16 values must be bit-wise converted to an uint16_t prior
* to writing to the buffer.
* When this field is present, the data_type field MUST be
* INT32, INT16, INT8, UINT16, INT8, BOOL, or FLOAT32
*
* For int32, uint8, int8, uint16, int16, bool, and float16 values
* float16 values must be bit-wise converted to an uint16_t prior
* to writing to the buffer.
* When this field is present, the data_type field MUST be
* INT32, INT16, INT8, UINT16, INT8, BOOL, or FLOAT32
*
*
* repeated int32 int32_data = 5 [packed = true];
*/
public int getInt32DataCount() {
return int32Data_.size();
}
/**
*
* For int32, uint8, int8, uint16, int16, bool, and float16 values
* float16 values must be bit-wise converted to an uint16_t prior
* to writing to the buffer.
* When this field is present, the data_type field MUST be
* INT32, INT16, INT8, UINT16, INT8, BOOL, or FLOAT32
*
*
* repeated int32 int32_data = 5 [packed = true];
*/
public int getInt32Data(int index) {
return int32Data_.get(index);
}
private int int32DataMemoizedSerializedSize = -1;
public static final int STRING_DATA_FIELD_NUMBER = 6;
private java.util.List stringData_;
/**
*
* For strings.
* Each element of string_data is a UTF-8 encoded Unicode
* string. No trailing null, no leading BOM. The protobuf "string"
* scalar type is not used to match ML community conventions.
* When this field is present, the data_type field MUST be STRING
*
* For strings.
* Each element of string_data is a UTF-8 encoded Unicode
* string. No trailing null, no leading BOM. The protobuf "string"
* scalar type is not used to match ML community conventions.
* When this field is present, the data_type field MUST be STRING
*
*
* repeated bytes string_data = 6;
*/
public int getStringDataCount() {
return stringData_.size();
}
/**
*
* For strings.
* Each element of string_data is a UTF-8 encoded Unicode
* string. No trailing null, no leading BOM. The protobuf "string"
* scalar type is not used to match ML community conventions.
* When this field is present, the data_type field MUST be STRING
*
*
* repeated bytes string_data = 6;
*/
public org.nd4j.shade.protobuf.ByteString getStringData(int index) {
return stringData_.get(index);
}
public static final int INT64_DATA_FIELD_NUMBER = 7;
private java.util.List int64Data_;
/**
*
* For int64.
* When this field is present, the data_type field MUST be INT64
*
* A human-readable documentation for this tensor. Markdown is allowed.
*
*
* string doc_string = 12;
*/
public org.nd4j.shade.protobuf.ByteString
getDocStringBytes() {
java.lang.Object ref = docString_;
if (ref instanceof java.lang.String) {
org.nd4j.shade.protobuf.ByteString b =
org.nd4j.shade.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
docString_ = b;
return b;
} else {
return (org.nd4j.shade.protobuf.ByteString) ref;
}
}
public static final int RAW_DATA_FIELD_NUMBER = 9;
private org.nd4j.shade.protobuf.ByteString rawData_;
/**
*
* Serializations can either use one of the fields above, or use this
* raw bytes field. The only exception is the string case, where one is
* required to store the content in the repeated bytes string_data field.
* When this raw_data field is used to store tensor value, elements MUST
* be stored in as fixed-width, little-endian order.
* Floating-point data types MUST be stored in IEEE 754 format.
* Complex64 elements must be written as two consecutive FLOAT values, real component first.
* Complex128 elements must be written as two consecutive DOUBLE values, real component first.
* Boolean type MUST be written one byte per tensor element (00000001 for true, 00000000 for false).
* Note: the advantage of specific field rather than the raw_data field is
* that in some cases (e.g. int data), protobuf does a better packing via
* variable length storage, and may lead to smaller binary footprint.
* When this field is present, the data_type field MUST NOT be STRING or UNDEFINED
*
*
* bytes raw_data = 9;
*/
public org.nd4j.shade.protobuf.ByteString getRawData() {
return rawData_;
}
public static final int DOUBLE_DATA_FIELD_NUMBER = 10;
private java.util.List doubleData_;
/**
*
* For double
* Complex64 tensors are encoded as a single array of doubles,
* with the real components appearing in odd numbered positions,
* and the corresponding imaginary component apparing in the
* subsequent even numbered position. (e.g., [1.0 + 2.0i, 3.0 + 4.0i]
* is encoded as [1.0, 2.0 ,3.0 ,4.0]
* When this field is present, the data_type field MUST be DOUBLE or COMPLEX128
*
* For double
* Complex64 tensors are encoded as a single array of doubles,
* with the real components appearing in odd numbered positions,
* and the corresponding imaginary component apparing in the
* subsequent even numbered position. (e.g., [1.0 + 2.0i, 3.0 + 4.0i]
* is encoded as [1.0, 2.0 ,3.0 ,4.0]
* When this field is present, the data_type field MUST be DOUBLE or COMPLEX128
*
*
* repeated double double_data = 10 [packed = true];
*/
public int getDoubleDataCount() {
return doubleData_.size();
}
/**
*
* For double
* Complex64 tensors are encoded as a single array of doubles,
* with the real components appearing in odd numbered positions,
* and the corresponding imaginary component apparing in the
* subsequent even numbered position. (e.g., [1.0 + 2.0i, 3.0 + 4.0i]
* is encoded as [1.0, 2.0 ,3.0 ,4.0]
* When this field is present, the data_type field MUST be DOUBLE or COMPLEX128
*
*
* repeated double double_data = 10 [packed = true];
*/
public double getDoubleData(int index) {
return doubleData_.get(index);
}
private int doubleDataMemoizedSerializedSize = -1;
public static final int UINT64_DATA_FIELD_NUMBER = 11;
private java.util.List uint64Data_;
/**
*
* For uint64 and uint32 values
* When this field is present, the data_type field MUST be
* UINT32 or UINT64
*
* For float and complex64 values
* Complex64 tensors are encoded as a single array of floats,
* with the real components appearing in odd numbered positions,
* and the corresponding imaginary component apparing in the
* subsequent even numbered position. (e.g., [1.0 + 2.0i, 3.0 + 4.0i]
* is encoded as [1.0, 2.0 ,3.0 ,4.0]
* When this field is present, the data_type field MUST be FLOAT or COMPLEX64.
*
* For float and complex64 values
* Complex64 tensors are encoded as a single array of floats,
* with the real components appearing in odd numbered positions,
* and the corresponding imaginary component apparing in the
* subsequent even numbered position. (e.g., [1.0 + 2.0i, 3.0 + 4.0i]
* is encoded as [1.0, 2.0 ,3.0 ,4.0]
* When this field is present, the data_type field MUST be FLOAT or COMPLEX64.
*
*
* repeated float float_data = 4 [packed = true];
*/
public int getFloatDataCount() {
return floatData_.size();
}
/**
*
* For float and complex64 values
* Complex64 tensors are encoded as a single array of floats,
* with the real components appearing in odd numbered positions,
* and the corresponding imaginary component apparing in the
* subsequent even numbered position. (e.g., [1.0 + 2.0i, 3.0 + 4.0i]
* is encoded as [1.0, 2.0 ,3.0 ,4.0]
* When this field is present, the data_type field MUST be FLOAT or COMPLEX64.
*
* For float and complex64 values
* Complex64 tensors are encoded as a single array of floats,
* with the real components appearing in odd numbered positions,
* and the corresponding imaginary component apparing in the
* subsequent even numbered position. (e.g., [1.0 + 2.0i, 3.0 + 4.0i]
* is encoded as [1.0, 2.0 ,3.0 ,4.0]
* When this field is present, the data_type field MUST be FLOAT or COMPLEX64.
*
* For float and complex64 values
* Complex64 tensors are encoded as a single array of floats,
* with the real components appearing in odd numbered positions,
* and the corresponding imaginary component apparing in the
* subsequent even numbered position. (e.g., [1.0 + 2.0i, 3.0 + 4.0i]
* is encoded as [1.0, 2.0 ,3.0 ,4.0]
* When this field is present, the data_type field MUST be FLOAT or COMPLEX64.
*
* For float and complex64 values
* Complex64 tensors are encoded as a single array of floats,
* with the real components appearing in odd numbered positions,
* and the corresponding imaginary component apparing in the
* subsequent even numbered position. (e.g., [1.0 + 2.0i, 3.0 + 4.0i]
* is encoded as [1.0, 2.0 ,3.0 ,4.0]
* When this field is present, the data_type field MUST be FLOAT or COMPLEX64.
*
* For float and complex64 values
* Complex64 tensors are encoded as a single array of floats,
* with the real components appearing in odd numbered positions,
* and the corresponding imaginary component apparing in the
* subsequent even numbered position. (e.g., [1.0 + 2.0i, 3.0 + 4.0i]
* is encoded as [1.0, 2.0 ,3.0 ,4.0]
* When this field is present, the data_type field MUST be FLOAT or COMPLEX64.
*
* For int32, uint8, int8, uint16, int16, bool, and float16 values
* float16 values must be bit-wise converted to an uint16_t prior
* to writing to the buffer.
* When this field is present, the data_type field MUST be
* INT32, INT16, INT8, UINT16, INT8, BOOL, or FLOAT32
*
* For int32, uint8, int8, uint16, int16, bool, and float16 values
* float16 values must be bit-wise converted to an uint16_t prior
* to writing to the buffer.
* When this field is present, the data_type field MUST be
* INT32, INT16, INT8, UINT16, INT8, BOOL, or FLOAT32
*
*
* repeated int32 int32_data = 5 [packed = true];
*/
public int getInt32DataCount() {
return int32Data_.size();
}
/**
*
* For int32, uint8, int8, uint16, int16, bool, and float16 values
* float16 values must be bit-wise converted to an uint16_t prior
* to writing to the buffer.
* When this field is present, the data_type field MUST be
* INT32, INT16, INT8, UINT16, INT8, BOOL, or FLOAT32
*
* For int32, uint8, int8, uint16, int16, bool, and float16 values
* float16 values must be bit-wise converted to an uint16_t prior
* to writing to the buffer.
* When this field is present, the data_type field MUST be
* INT32, INT16, INT8, UINT16, INT8, BOOL, or FLOAT32
*
*
* repeated int32 int32_data = 5 [packed = true];
*/
public Builder setInt32Data(
int index, int value) {
ensureInt32DataIsMutable();
int32Data_.set(index, value);
onChanged();
return this;
}
/**
*
* For int32, uint8, int8, uint16, int16, bool, and float16 values
* float16 values must be bit-wise converted to an uint16_t prior
* to writing to the buffer.
* When this field is present, the data_type field MUST be
* INT32, INT16, INT8, UINT16, INT8, BOOL, or FLOAT32
*
* For int32, uint8, int8, uint16, int16, bool, and float16 values
* float16 values must be bit-wise converted to an uint16_t prior
* to writing to the buffer.
* When this field is present, the data_type field MUST be
* INT32, INT16, INT8, UINT16, INT8, BOOL, or FLOAT32
*
* For int32, uint8, int8, uint16, int16, bool, and float16 values
* float16 values must be bit-wise converted to an uint16_t prior
* to writing to the buffer.
* When this field is present, the data_type field MUST be
* INT32, INT16, INT8, UINT16, INT8, BOOL, or FLOAT32
*
* For strings.
* Each element of string_data is a UTF-8 encoded Unicode
* string. No trailing null, no leading BOM. The protobuf "string"
* scalar type is not used to match ML community conventions.
* When this field is present, the data_type field MUST be STRING
*
* For strings.
* Each element of string_data is a UTF-8 encoded Unicode
* string. No trailing null, no leading BOM. The protobuf "string"
* scalar type is not used to match ML community conventions.
* When this field is present, the data_type field MUST be STRING
*
*
* repeated bytes string_data = 6;
*/
public int getStringDataCount() {
return stringData_.size();
}
/**
*
* For strings.
* Each element of string_data is a UTF-8 encoded Unicode
* string. No trailing null, no leading BOM. The protobuf "string"
* scalar type is not used to match ML community conventions.
* When this field is present, the data_type field MUST be STRING
*
* For strings.
* Each element of string_data is a UTF-8 encoded Unicode
* string. No trailing null, no leading BOM. The protobuf "string"
* scalar type is not used to match ML community conventions.
* When this field is present, the data_type field MUST be STRING
*
*
* repeated bytes string_data = 6;
*/
public Builder setStringData(
int index, org.nd4j.shade.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
ensureStringDataIsMutable();
stringData_.set(index, value);
onChanged();
return this;
}
/**
*
* For strings.
* Each element of string_data is a UTF-8 encoded Unicode
* string. No trailing null, no leading BOM. The protobuf "string"
* scalar type is not used to match ML community conventions.
* When this field is present, the data_type field MUST be STRING
*
*
* repeated bytes string_data = 6;
*/
public Builder addStringData(org.nd4j.shade.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
ensureStringDataIsMutable();
stringData_.add(value);
onChanged();
return this;
}
/**
*
* For strings.
* Each element of string_data is a UTF-8 encoded Unicode
* string. No trailing null, no leading BOM. The protobuf "string"
* scalar type is not used to match ML community conventions.
* When this field is present, the data_type field MUST be STRING
*
* For strings.
* Each element of string_data is a UTF-8 encoded Unicode
* string. No trailing null, no leading BOM. The protobuf "string"
* scalar type is not used to match ML community conventions.
* When this field is present, the data_type field MUST be STRING
*
* Serializations can either use one of the fields above, or use this
* raw bytes field. The only exception is the string case, where one is
* required to store the content in the repeated bytes string_data field.
* When this raw_data field is used to store tensor value, elements MUST
* be stored in as fixed-width, little-endian order.
* Floating-point data types MUST be stored in IEEE 754 format.
* Complex64 elements must be written as two consecutive FLOAT values, real component first.
* Complex128 elements must be written as two consecutive DOUBLE values, real component first.
* Boolean type MUST be written one byte per tensor element (00000001 for true, 00000000 for false).
* Note: the advantage of specific field rather than the raw_data field is
* that in some cases (e.g. int data), protobuf does a better packing via
* variable length storage, and may lead to smaller binary footprint.
* When this field is present, the data_type field MUST NOT be STRING or UNDEFINED
*
* Serializations can either use one of the fields above, or use this
* raw bytes field. The only exception is the string case, where one is
* required to store the content in the repeated bytes string_data field.
* When this raw_data field is used to store tensor value, elements MUST
* be stored in as fixed-width, little-endian order.
* Floating-point data types MUST be stored in IEEE 754 format.
* Complex64 elements must be written as two consecutive FLOAT values, real component first.
* Complex128 elements must be written as two consecutive DOUBLE values, real component first.
* Boolean type MUST be written one byte per tensor element (00000001 for true, 00000000 for false).
* Note: the advantage of specific field rather than the raw_data field is
* that in some cases (e.g. int data), protobuf does a better packing via
* variable length storage, and may lead to smaller binary footprint.
* When this field is present, the data_type field MUST NOT be STRING or UNDEFINED
*
*
* bytes raw_data = 9;
*/
public Builder setRawData(org.nd4j.shade.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
rawData_ = value;
onChanged();
return this;
}
/**
*
* Serializations can either use one of the fields above, or use this
* raw bytes field. The only exception is the string case, where one is
* required to store the content in the repeated bytes string_data field.
* When this raw_data field is used to store tensor value, elements MUST
* be stored in as fixed-width, little-endian order.
* Floating-point data types MUST be stored in IEEE 754 format.
* Complex64 elements must be written as two consecutive FLOAT values, real component first.
* Complex128 elements must be written as two consecutive DOUBLE values, real component first.
* Boolean type MUST be written one byte per tensor element (00000001 for true, 00000000 for false).
* Note: the advantage of specific field rather than the raw_data field is
* that in some cases (e.g. int data), protobuf does a better packing via
* variable length storage, and may lead to smaller binary footprint.
* When this field is present, the data_type field MUST NOT be STRING or UNDEFINED
*
* For double
* Complex64 tensors are encoded as a single array of doubles,
* with the real components appearing in odd numbered positions,
* and the corresponding imaginary component apparing in the
* subsequent even numbered position. (e.g., [1.0 + 2.0i, 3.0 + 4.0i]
* is encoded as [1.0, 2.0 ,3.0 ,4.0]
* When this field is present, the data_type field MUST be DOUBLE or COMPLEX128
*
* For double
* Complex64 tensors are encoded as a single array of doubles,
* with the real components appearing in odd numbered positions,
* and the corresponding imaginary component apparing in the
* subsequent even numbered position. (e.g., [1.0 + 2.0i, 3.0 + 4.0i]
* is encoded as [1.0, 2.0 ,3.0 ,4.0]
* When this field is present, the data_type field MUST be DOUBLE or COMPLEX128
*
*
* repeated double double_data = 10 [packed = true];
*/
public int getDoubleDataCount() {
return doubleData_.size();
}
/**
*
* For double
* Complex64 tensors are encoded as a single array of doubles,
* with the real components appearing in odd numbered positions,
* and the corresponding imaginary component apparing in the
* subsequent even numbered position. (e.g., [1.0 + 2.0i, 3.0 + 4.0i]
* is encoded as [1.0, 2.0 ,3.0 ,4.0]
* When this field is present, the data_type field MUST be DOUBLE or COMPLEX128
*
* For double
* Complex64 tensors are encoded as a single array of doubles,
* with the real components appearing in odd numbered positions,
* and the corresponding imaginary component apparing in the
* subsequent even numbered position. (e.g., [1.0 + 2.0i, 3.0 + 4.0i]
* is encoded as [1.0, 2.0 ,3.0 ,4.0]
* When this field is present, the data_type field MUST be DOUBLE or COMPLEX128
*
* For double
* Complex64 tensors are encoded as a single array of doubles,
* with the real components appearing in odd numbered positions,
* and the corresponding imaginary component apparing in the
* subsequent even numbered position. (e.g., [1.0 + 2.0i, 3.0 + 4.0i]
* is encoded as [1.0, 2.0 ,3.0 ,4.0]
* When this field is present, the data_type field MUST be DOUBLE or COMPLEX128
*
* For double
* Complex64 tensors are encoded as a single array of doubles,
* with the real components appearing in odd numbered positions,
* and the corresponding imaginary component apparing in the
* subsequent even numbered position. (e.g., [1.0 + 2.0i, 3.0 + 4.0i]
* is encoded as [1.0, 2.0 ,3.0 ,4.0]
* When this field is present, the data_type field MUST be DOUBLE or COMPLEX128
*
* For double
* Complex64 tensors are encoded as a single array of doubles,
* with the real components appearing in odd numbered positions,
* and the corresponding imaginary component apparing in the
* subsequent even numbered position. (e.g., [1.0 + 2.0i, 3.0 + 4.0i]
* is encoded as [1.0, 2.0 ,3.0 ,4.0]
* When this field is present, the data_type field MUST be DOUBLE or COMPLEX128
*
* For uint64 and uint32 values
* When this field is present, the data_type field MUST be
* UINT32 or UINT64
*
*
* repeated uint64 uint64_data = 11 [packed = true];
*/
public Builder clearUint64Data() {
uint64Data_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000800);
onChanged();
return this;
}
public final Builder setUnknownFields(
final org.nd4j.shade.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(unknownFields);
}
public final Builder mergeUnknownFields(
final org.nd4j.shade.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:onnx.TensorProto)
}
// @@protoc_insertion_point(class_scope:onnx.TensorProto)
private static final onnx.Onnx.TensorProto DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new onnx.Onnx.TensorProto();
}
public static onnx.Onnx.TensorProto getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final org.nd4j.shade.protobuf.Parser
PARSER = new org.nd4j.shade.protobuf.AbstractParser() {
public TensorProto parsePartialFrom(
org.nd4j.shade.protobuf.CodedInputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return new TensorProto(input, extensionRegistry);
}
};
public static org.nd4j.shade.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public org.nd4j.shade.protobuf.Parser getParserForType() {
return PARSER;
}
public onnx.Onnx.TensorProto getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface TensorShapeProtoOrBuilder extends
// @@protoc_insertion_point(interface_extends:onnx.TensorShapeProto)
org.nd4j.shade.protobuf.MessageOrBuilder {
/**
* repeated .onnx.TensorShapeProto.Dimension dim = 1;
*/
java.util.List
getDimList();
/**
* repeated .onnx.TensorShapeProto.Dimension dim = 1;
*/
onnx.Onnx.TensorShapeProto.Dimension getDim(int index);
/**
* repeated .onnx.TensorShapeProto.Dimension dim = 1;
*/
int getDimCount();
/**
* repeated .onnx.TensorShapeProto.Dimension dim = 1;
*/
java.util.List extends onnx.Onnx.TensorShapeProto.DimensionOrBuilder>
getDimOrBuilderList();
/**
* repeated .onnx.TensorShapeProto.Dimension dim = 1;
*/
onnx.Onnx.TensorShapeProto.DimensionOrBuilder getDimOrBuilder(
int index);
}
/**
*
* Defines a tensor shape. A dimension can be either an integer value
* or a symbolic variable. A symbolic variable represents an unknown
* dimension.
*
*
* Protobuf type {@code onnx.TensorShapeProto}
*/
public static final class TensorShapeProto extends
org.nd4j.shade.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:onnx.TensorShapeProto)
TensorShapeProtoOrBuilder {
private static final long serialVersionUID = 0L;
// Use TensorShapeProto.newBuilder() to construct.
private TensorShapeProto(org.nd4j.shade.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private TensorShapeProto() {
dim_ = java.util.Collections.emptyList();
}
@java.lang.Override
public final org.nd4j.shade.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private TensorShapeProto(
org.nd4j.shade.protobuf.CodedInputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
org.nd4j.shade.protobuf.UnknownFieldSet.Builder unknownFields =
org.nd4j.shade.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
case 10: {
if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
dim_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
dim_.add(
input.readMessage(onnx.Onnx.TensorShapeProto.Dimension.parser(), extensionRegistry));
break;
}
}
}
} catch (org.nd4j.shade.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new org.nd4j.shade.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
dim_ = java.util.Collections.unmodifiableList(dim_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final org.nd4j.shade.protobuf.Descriptors.Descriptor
getDescriptor() {
return onnx.Onnx.internal_static_onnx_TensorShapeProto_descriptor;
}
protected org.nd4j.shade.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return onnx.Onnx.internal_static_onnx_TensorShapeProto_fieldAccessorTable
.ensureFieldAccessorsInitialized(
onnx.Onnx.TensorShapeProto.class, onnx.Onnx.TensorShapeProto.Builder.class);
}
public interface DimensionOrBuilder extends
// @@protoc_insertion_point(interface_extends:onnx.TensorShapeProto.Dimension)
org.nd4j.shade.protobuf.MessageOrBuilder {
/**
* int64 dim_value = 1;
*/
long getDimValue();
/**
*
*
* string dim_param = 2;
*/
public Builder setDimParamBytes(
org.nd4j.shade.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
valueCase_ = 2;
value_ = value;
onChanged();
return this;
}
public final Builder setUnknownFields(
final org.nd4j.shade.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(unknownFields);
}
public final Builder mergeUnknownFields(
final org.nd4j.shade.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:onnx.TensorShapeProto.Dimension)
}
// @@protoc_insertion_point(class_scope:onnx.TensorShapeProto.Dimension)
private static final onnx.Onnx.TensorShapeProto.Dimension DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new onnx.Onnx.TensorShapeProto.Dimension();
}
public static onnx.Onnx.TensorShapeProto.Dimension getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final org.nd4j.shade.protobuf.Parser
PARSER = new org.nd4j.shade.protobuf.AbstractParser() {
public Dimension parsePartialFrom(
org.nd4j.shade.protobuf.CodedInputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return new Dimension(input, extensionRegistry);
}
};
public static org.nd4j.shade.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public org.nd4j.shade.protobuf.Parser getParserForType() {
return PARSER;
}
public onnx.Onnx.TensorShapeProto.Dimension getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public static final int DIM_FIELD_NUMBER = 1;
private java.util.List dim_;
/**
* repeated .onnx.TensorShapeProto.Dimension dim = 1;
*/
public java.util.List getDimList() {
return dim_;
}
/**
* repeated .onnx.TensorShapeProto.Dimension dim = 1;
*/
public java.util.List extends onnx.Onnx.TensorShapeProto.DimensionOrBuilder>
getDimOrBuilderList() {
return dim_;
}
/**
* repeated .onnx.TensorShapeProto.Dimension dim = 1;
*/
public int getDimCount() {
return dim_.size();
}
/**
* repeated .onnx.TensorShapeProto.Dimension dim = 1;
*/
public onnx.Onnx.TensorShapeProto.Dimension getDim(int index) {
return dim_.get(index);
}
/**
* repeated .onnx.TensorShapeProto.Dimension dim = 1;
*/
public onnx.Onnx.TensorShapeProto.DimensionOrBuilder getDimOrBuilder(
int index) {
return dim_.get(index);
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(org.nd4j.shade.protobuf.CodedOutputStream output)
throws java.io.IOException {
for (int i = 0; i < dim_.size(); i++) {
output.writeMessage(1, dim_.get(i));
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < dim_.size(); i++) {
size += org.nd4j.shade.protobuf.CodedOutputStream
.computeMessageSize(1, dim_.get(i));
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof onnx.Onnx.TensorShapeProto)) {
return super.equals(obj);
}
onnx.Onnx.TensorShapeProto other = (onnx.Onnx.TensorShapeProto) obj;
boolean result = true;
result = result && getDimList()
.equals(other.getDimList());
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (getDimCount() > 0) {
hash = (37 * hash) + DIM_FIELD_NUMBER;
hash = (53 * hash) + getDimList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static onnx.Onnx.TensorShapeProto parseFrom(
java.nio.ByteBuffer data)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static onnx.Onnx.TensorShapeProto parseFrom(
java.nio.ByteBuffer data,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static onnx.Onnx.TensorShapeProto parseFrom(
org.nd4j.shade.protobuf.ByteString data)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static onnx.Onnx.TensorShapeProto parseFrom(
org.nd4j.shade.protobuf.ByteString data,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static onnx.Onnx.TensorShapeProto parseFrom(byte[] data)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static onnx.Onnx.TensorShapeProto parseFrom(
byte[] data,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static onnx.Onnx.TensorShapeProto parseFrom(java.io.InputStream input)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static onnx.Onnx.TensorShapeProto parseFrom(
java.io.InputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static onnx.Onnx.TensorShapeProto parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static onnx.Onnx.TensorShapeProto parseDelimitedFrom(
java.io.InputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static onnx.Onnx.TensorShapeProto parseFrom(
org.nd4j.shade.protobuf.CodedInputStream input)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static onnx.Onnx.TensorShapeProto parseFrom(
org.nd4j.shade.protobuf.CodedInputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(onnx.Onnx.TensorShapeProto prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
org.nd4j.shade.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* Defines a tensor shape. A dimension can be either an integer value
* or a symbolic variable. A symbolic variable represents an unknown
* dimension.
*
*
* Protobuf type {@code onnx.TensorShapeProto}
*/
public static final class Builder extends
org.nd4j.shade.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:onnx.TensorShapeProto)
onnx.Onnx.TensorShapeProtoOrBuilder {
public static final org.nd4j.shade.protobuf.Descriptors.Descriptor
getDescriptor() {
return onnx.Onnx.internal_static_onnx_TensorShapeProto_descriptor;
}
protected org.nd4j.shade.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return onnx.Onnx.internal_static_onnx_TensorShapeProto_fieldAccessorTable
.ensureFieldAccessorsInitialized(
onnx.Onnx.TensorShapeProto.class, onnx.Onnx.TensorShapeProto.Builder.class);
}
// Construct using onnx.Onnx.TensorShapeProto.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
org.nd4j.shade.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (org.nd4j.shade.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getDimFieldBuilder();
}
}
public Builder clear() {
super.clear();
if (dimBuilder_ == null) {
dim_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
} else {
dimBuilder_.clear();
}
return this;
}
public org.nd4j.shade.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return onnx.Onnx.internal_static_onnx_TensorShapeProto_descriptor;
}
public onnx.Onnx.TensorShapeProto getDefaultInstanceForType() {
return onnx.Onnx.TensorShapeProto.getDefaultInstance();
}
public onnx.Onnx.TensorShapeProto build() {
onnx.Onnx.TensorShapeProto result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public onnx.Onnx.TensorShapeProto buildPartial() {
onnx.Onnx.TensorShapeProto result = new onnx.Onnx.TensorShapeProto(this);
int from_bitField0_ = bitField0_;
if (dimBuilder_ == null) {
if (((bitField0_ & 0x00000001) == 0x00000001)) {
dim_ = java.util.Collections.unmodifiableList(dim_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.dim_ = dim_;
} else {
result.dim_ = dimBuilder_.build();
}
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
org.nd4j.shade.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
org.nd4j.shade.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
org.nd4j.shade.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
org.nd4j.shade.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
org.nd4j.shade.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(org.nd4j.shade.protobuf.Message other) {
if (other instanceof onnx.Onnx.TensorShapeProto) {
return mergeFrom((onnx.Onnx.TensorShapeProto)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(onnx.Onnx.TensorShapeProto other) {
if (other == onnx.Onnx.TensorShapeProto.getDefaultInstance()) return this;
if (dimBuilder_ == null) {
if (!other.dim_.isEmpty()) {
if (dim_.isEmpty()) {
dim_ = other.dim_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureDimIsMutable();
dim_.addAll(other.dim_);
}
onChanged();
}
} else {
if (!other.dim_.isEmpty()) {
if (dimBuilder_.isEmpty()) {
dimBuilder_.dispose();
dimBuilder_ = null;
dim_ = other.dim_;
bitField0_ = (bitField0_ & ~0x00000001);
dimBuilder_ =
org.nd4j.shade.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getDimFieldBuilder() : null;
} else {
dimBuilder_.addAllMessages(other.dim_);
}
}
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
org.nd4j.shade.protobuf.CodedInputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
onnx.Onnx.TensorShapeProto parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (org.nd4j.shade.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (onnx.Onnx.TensorShapeProto) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.util.List dim_ =
java.util.Collections.emptyList();
private void ensureDimIsMutable() {
if (!((bitField0_ & 0x00000001) == 0x00000001)) {
dim_ = new java.util.ArrayList(dim_);
bitField0_ |= 0x00000001;
}
}
private org.nd4j.shade.protobuf.RepeatedFieldBuilderV3<
onnx.Onnx.TensorShapeProto.Dimension, onnx.Onnx.TensorShapeProto.Dimension.Builder, onnx.Onnx.TensorShapeProto.DimensionOrBuilder> dimBuilder_;
/**
* repeated .onnx.TensorShapeProto.Dimension dim = 1;
*/
public java.util.List getDimList() {
if (dimBuilder_ == null) {
return java.util.Collections.unmodifiableList(dim_);
} else {
return dimBuilder_.getMessageList();
}
}
/**
* repeated .onnx.TensorShapeProto.Dimension dim = 1;
*/
public int getDimCount() {
if (dimBuilder_ == null) {
return dim_.size();
} else {
return dimBuilder_.getCount();
}
}
/**
* repeated .onnx.TensorShapeProto.Dimension dim = 1;
*/
public onnx.Onnx.TensorShapeProto.Dimension getDim(int index) {
if (dimBuilder_ == null) {
return dim_.get(index);
} else {
return dimBuilder_.getMessage(index);
}
}
/**
* repeated .onnx.TensorShapeProto.Dimension dim = 1;
*/
public Builder setDim(
int index, onnx.Onnx.TensorShapeProto.Dimension value) {
if (dimBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureDimIsMutable();
dim_.set(index, value);
onChanged();
} else {
dimBuilder_.setMessage(index, value);
}
return this;
}
/**
* repeated .onnx.TensorShapeProto.Dimension dim = 1;
*/
public Builder setDim(
int index, onnx.Onnx.TensorShapeProto.Dimension.Builder builderForValue) {
if (dimBuilder_ == null) {
ensureDimIsMutable();
dim_.set(index, builderForValue.build());
onChanged();
} else {
dimBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .onnx.TensorShapeProto.Dimension dim = 1;
*/
public Builder addDim(onnx.Onnx.TensorShapeProto.Dimension value) {
if (dimBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureDimIsMutable();
dim_.add(value);
onChanged();
} else {
dimBuilder_.addMessage(value);
}
return this;
}
/**
* repeated .onnx.TensorShapeProto.Dimension dim = 1;
*/
public Builder addDim(
int index, onnx.Onnx.TensorShapeProto.Dimension value) {
if (dimBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureDimIsMutable();
dim_.add(index, value);
onChanged();
} else {
dimBuilder_.addMessage(index, value);
}
return this;
}
/**
* repeated .onnx.TensorShapeProto.Dimension dim = 1;
*/
public Builder addDim(
onnx.Onnx.TensorShapeProto.Dimension.Builder builderForValue) {
if (dimBuilder_ == null) {
ensureDimIsMutable();
dim_.add(builderForValue.build());
onChanged();
} else {
dimBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
* repeated .onnx.TensorShapeProto.Dimension dim = 1;
*/
public Builder addDim(
int index, onnx.Onnx.TensorShapeProto.Dimension.Builder builderForValue) {
if (dimBuilder_ == null) {
ensureDimIsMutable();
dim_.add(index, builderForValue.build());
onChanged();
} else {
dimBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .onnx.TensorShapeProto.Dimension dim = 1;
*/
public Builder addAllDim(
java.lang.Iterable extends onnx.Onnx.TensorShapeProto.Dimension> values) {
if (dimBuilder_ == null) {
ensureDimIsMutable();
org.nd4j.shade.protobuf.AbstractMessageLite.Builder.addAll(
values, dim_);
onChanged();
} else {
dimBuilder_.addAllMessages(values);
}
return this;
}
/**
* repeated .onnx.TensorShapeProto.Dimension dim = 1;
*/
public Builder clearDim() {
if (dimBuilder_ == null) {
dim_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
dimBuilder_.clear();
}
return this;
}
/**
* repeated .onnx.TensorShapeProto.Dimension dim = 1;
*/
public Builder removeDim(int index) {
if (dimBuilder_ == null) {
ensureDimIsMutable();
dim_.remove(index);
onChanged();
} else {
dimBuilder_.remove(index);
}
return this;
}
/**
* repeated .onnx.TensorShapeProto.Dimension dim = 1;
*/
public onnx.Onnx.TensorShapeProto.Dimension.Builder getDimBuilder(
int index) {
return getDimFieldBuilder().getBuilder(index);
}
/**
* repeated .onnx.TensorShapeProto.Dimension dim = 1;
*/
public onnx.Onnx.TensorShapeProto.DimensionOrBuilder getDimOrBuilder(
int index) {
if (dimBuilder_ == null) {
return dim_.get(index); } else {
return dimBuilder_.getMessageOrBuilder(index);
}
}
/**
* repeated .onnx.TensorShapeProto.Dimension dim = 1;
*/
public java.util.List extends onnx.Onnx.TensorShapeProto.DimensionOrBuilder>
getDimOrBuilderList() {
if (dimBuilder_ != null) {
return dimBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(dim_);
}
}
/**
* repeated .onnx.TensorShapeProto.Dimension dim = 1;
*/
public onnx.Onnx.TensorShapeProto.Dimension.Builder addDimBuilder() {
return getDimFieldBuilder().addBuilder(
onnx.Onnx.TensorShapeProto.Dimension.getDefaultInstance());
}
/**
* repeated .onnx.TensorShapeProto.Dimension dim = 1;
*/
public onnx.Onnx.TensorShapeProto.Dimension.Builder addDimBuilder(
int index) {
return getDimFieldBuilder().addBuilder(
index, onnx.Onnx.TensorShapeProto.Dimension.getDefaultInstance());
}
/**
* repeated .onnx.TensorShapeProto.Dimension dim = 1;
*/
public java.util.List
getDimBuilderList() {
return getDimFieldBuilder().getBuilderList();
}
private org.nd4j.shade.protobuf.RepeatedFieldBuilderV3<
onnx.Onnx.TensorShapeProto.Dimension, onnx.Onnx.TensorShapeProto.Dimension.Builder, onnx.Onnx.TensorShapeProto.DimensionOrBuilder>
getDimFieldBuilder() {
if (dimBuilder_ == null) {
dimBuilder_ = new org.nd4j.shade.protobuf.RepeatedFieldBuilderV3<
onnx.Onnx.TensorShapeProto.Dimension, onnx.Onnx.TensorShapeProto.Dimension.Builder, onnx.Onnx.TensorShapeProto.DimensionOrBuilder>(
dim_,
((bitField0_ & 0x00000001) == 0x00000001),
getParentForChildren(),
isClean());
dim_ = null;
}
return dimBuilder_;
}
public final Builder setUnknownFields(
final org.nd4j.shade.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(unknownFields);
}
public final Builder mergeUnknownFields(
final org.nd4j.shade.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:onnx.TensorShapeProto)
}
// @@protoc_insertion_point(class_scope:onnx.TensorShapeProto)
private static final onnx.Onnx.TensorShapeProto DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new onnx.Onnx.TensorShapeProto();
}
public static onnx.Onnx.TensorShapeProto getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final org.nd4j.shade.protobuf.Parser
PARSER = new org.nd4j.shade.protobuf.AbstractParser() {
public TensorShapeProto parsePartialFrom(
org.nd4j.shade.protobuf.CodedInputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return new TensorShapeProto(input, extensionRegistry);
}
};
public static org.nd4j.shade.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public org.nd4j.shade.protobuf.Parser getParserForType() {
return PARSER;
}
public onnx.Onnx.TensorShapeProto getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface TypeProtoOrBuilder extends
// @@protoc_insertion_point(interface_extends:onnx.TypeProto)
org.nd4j.shade.protobuf.MessageOrBuilder {
/**
*
*
* .onnx.TypeProto.Tensor tensor_type = 1;
*/
private org.nd4j.shade.protobuf.SingleFieldBuilderV3<
onnx.Onnx.TypeProto.Tensor, onnx.Onnx.TypeProto.Tensor.Builder, onnx.Onnx.TypeProto.TensorOrBuilder>
getTensorTypeFieldBuilder() {
if (tensorTypeBuilder_ == null) {
if (!(valueCase_ == 1)) {
value_ = onnx.Onnx.TypeProto.Tensor.getDefaultInstance();
}
tensorTypeBuilder_ = new org.nd4j.shade.protobuf.SingleFieldBuilderV3<
onnx.Onnx.TypeProto.Tensor, onnx.Onnx.TypeProto.Tensor.Builder, onnx.Onnx.TypeProto.TensorOrBuilder>(
(onnx.Onnx.TypeProto.Tensor) value_,
getParentForChildren(),
isClean());
value_ = null;
}
valueCase_ = 1;
onChanged();;
return tensorTypeBuilder_;
}
public final Builder setUnknownFields(
final org.nd4j.shade.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(unknownFields);
}
public final Builder mergeUnknownFields(
final org.nd4j.shade.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:onnx.TypeProto)
}
// @@protoc_insertion_point(class_scope:onnx.TypeProto)
private static final onnx.Onnx.TypeProto DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new onnx.Onnx.TypeProto();
}
public static onnx.Onnx.TypeProto getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final org.nd4j.shade.protobuf.Parser
PARSER = new org.nd4j.shade.protobuf.AbstractParser() {
public TypeProto parsePartialFrom(
org.nd4j.shade.protobuf.CodedInputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return new TypeProto(input, extensionRegistry);
}
};
public static org.nd4j.shade.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public org.nd4j.shade.protobuf.Parser getParserForType() {
return PARSER;
}
public onnx.Onnx.TypeProto getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface OperatorSetIdProtoOrBuilder extends
// @@protoc_insertion_point(interface_extends:onnx.OperatorSetIdProto)
org.nd4j.shade.protobuf.MessageOrBuilder {
/**
*
* The domain of the operator set being identified.
* The empty string ("") or absence of this field implies the operator
* set that is defined as part of the ONNX specification.
* This field MUST be present in this version of the IR when referring to any other operator set.
*
* The domain of the operator set being identified.
* The empty string ("") or absence of this field implies the operator
* set that is defined as part of the ONNX specification.
* This field MUST be present in this version of the IR when referring to any other operator set.
*
* The version of the operator set being identified.
* This field MUST be present in this version of the IR.
*
*
* int64 version = 2;
*/
long getVersion();
}
/**
*
* OperatorSets are uniquely identified by a (domain, opset_version) pair.
*
*
* Protobuf type {@code onnx.OperatorSetIdProto}
*/
public static final class OperatorSetIdProto extends
org.nd4j.shade.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:onnx.OperatorSetIdProto)
OperatorSetIdProtoOrBuilder {
private static final long serialVersionUID = 0L;
// Use OperatorSetIdProto.newBuilder() to construct.
private OperatorSetIdProto(org.nd4j.shade.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private OperatorSetIdProto() {
domain_ = "";
version_ = 0L;
}
@java.lang.Override
public final org.nd4j.shade.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private OperatorSetIdProto(
org.nd4j.shade.protobuf.CodedInputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
org.nd4j.shade.protobuf.UnknownFieldSet.Builder unknownFields =
org.nd4j.shade.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
case 10: {
java.lang.String s = input.readStringRequireUtf8();
domain_ = s;
break;
}
case 16: {
version_ = input.readInt64();
break;
}
}
}
} catch (org.nd4j.shade.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new org.nd4j.shade.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final org.nd4j.shade.protobuf.Descriptors.Descriptor
getDescriptor() {
return onnx.Onnx.internal_static_onnx_OperatorSetIdProto_descriptor;
}
protected org.nd4j.shade.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return onnx.Onnx.internal_static_onnx_OperatorSetIdProto_fieldAccessorTable
.ensureFieldAccessorsInitialized(
onnx.Onnx.OperatorSetIdProto.class, onnx.Onnx.OperatorSetIdProto.Builder.class);
}
public static final int DOMAIN_FIELD_NUMBER = 1;
private volatile java.lang.Object domain_;
/**
*
* The domain of the operator set being identified.
* The empty string ("") or absence of this field implies the operator
* set that is defined as part of the ONNX specification.
* This field MUST be present in this version of the IR when referring to any other operator set.
*
* The domain of the operator set being identified.
* The empty string ("") or absence of this field implies the operator
* set that is defined as part of the ONNX specification.
* This field MUST be present in this version of the IR when referring to any other operator set.
*
*
* string domain = 1;
*/
public org.nd4j.shade.protobuf.ByteString
getDomainBytes() {
java.lang.Object ref = domain_;
if (ref instanceof java.lang.String) {
org.nd4j.shade.protobuf.ByteString b =
org.nd4j.shade.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
domain_ = b;
return b;
} else {
return (org.nd4j.shade.protobuf.ByteString) ref;
}
}
public static final int VERSION_FIELD_NUMBER = 2;
private long version_;
/**
*
* The version of the operator set being identified.
* This field MUST be present in this version of the IR.
*
*
* int64 version = 2;
*/
public long getVersion() {
return version_;
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(org.nd4j.shade.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!getDomainBytes().isEmpty()) {
org.nd4j.shade.protobuf.GeneratedMessageV3.writeString(output, 1, domain_);
}
if (version_ != 0L) {
output.writeInt64(2, version_);
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getDomainBytes().isEmpty()) {
size += org.nd4j.shade.protobuf.GeneratedMessageV3.computeStringSize(1, domain_);
}
if (version_ != 0L) {
size += org.nd4j.shade.protobuf.CodedOutputStream
.computeInt64Size(2, version_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof onnx.Onnx.OperatorSetIdProto)) {
return super.equals(obj);
}
onnx.Onnx.OperatorSetIdProto other = (onnx.Onnx.OperatorSetIdProto) obj;
boolean result = true;
result = result && getDomain()
.equals(other.getDomain());
result = result && (getVersion()
== other.getVersion());
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + DOMAIN_FIELD_NUMBER;
hash = (53 * hash) + getDomain().hashCode();
hash = (37 * hash) + VERSION_FIELD_NUMBER;
hash = (53 * hash) + org.nd4j.shade.protobuf.Internal.hashLong(
getVersion());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static onnx.Onnx.OperatorSetIdProto parseFrom(
java.nio.ByteBuffer data)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static onnx.Onnx.OperatorSetIdProto parseFrom(
java.nio.ByteBuffer data,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static onnx.Onnx.OperatorSetIdProto parseFrom(
org.nd4j.shade.protobuf.ByteString data)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static onnx.Onnx.OperatorSetIdProto parseFrom(
org.nd4j.shade.protobuf.ByteString data,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static onnx.Onnx.OperatorSetIdProto parseFrom(byte[] data)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static onnx.Onnx.OperatorSetIdProto parseFrom(
byte[] data,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static onnx.Onnx.OperatorSetIdProto parseFrom(java.io.InputStream input)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static onnx.Onnx.OperatorSetIdProto parseFrom(
java.io.InputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static onnx.Onnx.OperatorSetIdProto parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static onnx.Onnx.OperatorSetIdProto parseDelimitedFrom(
java.io.InputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static onnx.Onnx.OperatorSetIdProto parseFrom(
org.nd4j.shade.protobuf.CodedInputStream input)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static onnx.Onnx.OperatorSetIdProto parseFrom(
org.nd4j.shade.protobuf.CodedInputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(onnx.Onnx.OperatorSetIdProto prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
org.nd4j.shade.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* OperatorSets are uniquely identified by a (domain, opset_version) pair.
*
*
* Protobuf type {@code onnx.OperatorSetIdProto}
*/
public static final class Builder extends
org.nd4j.shade.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:onnx.OperatorSetIdProto)
onnx.Onnx.OperatorSetIdProtoOrBuilder {
public static final org.nd4j.shade.protobuf.Descriptors.Descriptor
getDescriptor() {
return onnx.Onnx.internal_static_onnx_OperatorSetIdProto_descriptor;
}
protected org.nd4j.shade.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return onnx.Onnx.internal_static_onnx_OperatorSetIdProto_fieldAccessorTable
.ensureFieldAccessorsInitialized(
onnx.Onnx.OperatorSetIdProto.class, onnx.Onnx.OperatorSetIdProto.Builder.class);
}
// Construct using onnx.Onnx.OperatorSetIdProto.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
org.nd4j.shade.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (org.nd4j.shade.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
domain_ = "";
version_ = 0L;
return this;
}
public org.nd4j.shade.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return onnx.Onnx.internal_static_onnx_OperatorSetIdProto_descriptor;
}
public onnx.Onnx.OperatorSetIdProto getDefaultInstanceForType() {
return onnx.Onnx.OperatorSetIdProto.getDefaultInstance();
}
public onnx.Onnx.OperatorSetIdProto build() {
onnx.Onnx.OperatorSetIdProto result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public onnx.Onnx.OperatorSetIdProto buildPartial() {
onnx.Onnx.OperatorSetIdProto result = new onnx.Onnx.OperatorSetIdProto(this);
result.domain_ = domain_;
result.version_ = version_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
org.nd4j.shade.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
org.nd4j.shade.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
org.nd4j.shade.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
org.nd4j.shade.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
org.nd4j.shade.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(org.nd4j.shade.protobuf.Message other) {
if (other instanceof onnx.Onnx.OperatorSetIdProto) {
return mergeFrom((onnx.Onnx.OperatorSetIdProto)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(onnx.Onnx.OperatorSetIdProto other) {
if (other == onnx.Onnx.OperatorSetIdProto.getDefaultInstance()) return this;
if (!other.getDomain().isEmpty()) {
domain_ = other.domain_;
onChanged();
}
if (other.getVersion() != 0L) {
setVersion(other.getVersion());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
org.nd4j.shade.protobuf.CodedInputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
onnx.Onnx.OperatorSetIdProto parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (org.nd4j.shade.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (onnx.Onnx.OperatorSetIdProto) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object domain_ = "";
/**
*
* The domain of the operator set being identified.
* The empty string ("") or absence of this field implies the operator
* set that is defined as part of the ONNX specification.
* This field MUST be present in this version of the IR when referring to any other operator set.
*
* The domain of the operator set being identified.
* The empty string ("") or absence of this field implies the operator
* set that is defined as part of the ONNX specification.
* This field MUST be present in this version of the IR when referring to any other operator set.
*
* The domain of the operator set being identified.
* The empty string ("") or absence of this field implies the operator
* set that is defined as part of the ONNX specification.
* This field MUST be present in this version of the IR when referring to any other operator set.
*
* The domain of the operator set being identified.
* The empty string ("") or absence of this field implies the operator
* set that is defined as part of the ONNX specification.
* This field MUST be present in this version of the IR when referring to any other operator set.
*
* The domain of the operator set being identified.
* The empty string ("") or absence of this field implies the operator
* set that is defined as part of the ONNX specification.
* This field MUST be present in this version of the IR when referring to any other operator set.
*
*
* string domain = 1;
*/
public Builder setDomainBytes(
org.nd4j.shade.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
domain_ = value;
onChanged();
return this;
}
private long version_ ;
/**
*
* The version of the operator set being identified.
* This field MUST be present in this version of the IR.
*
*
* int64 version = 2;
*/
public long getVersion() {
return version_;
}
/**
*
* The version of the operator set being identified.
* This field MUST be present in this version of the IR.
*