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.
* A list of values that this kernel supports for this attr.
* Like OpDef.AttrDef.allowed_values, except for kernels instead of Ops.
*
*
* .tensorflow.AttrValue allowed_values = 2;
*/
@java.lang.Override
public org.tensorflow.framework.AttrValueOrBuilder getAllowedValuesOrBuilder() {
return getAllowedValues();
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(org.nd4j.shade.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!getNameBytes().isEmpty()) {
org.nd4j.shade.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
}
if (allowedValues_ != null) {
output.writeMessage(2, getAllowedValues());
}
unknownFields.writeTo(output);
}
@java.lang.Override
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 (allowedValues_ != null) {
size += org.nd4j.shade.protobuf.CodedOutputStream
.computeMessageSize(2, getAllowedValues());
}
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 org.tensorflow.framework.KernelDef.AttrConstraint)) {
return super.equals(obj);
}
org.tensorflow.framework.KernelDef.AttrConstraint other = (org.tensorflow.framework.KernelDef.AttrConstraint) obj;
if (!getName()
.equals(other.getName())) return false;
if (hasAllowedValues() != other.hasAllowedValues()) return false;
if (hasAllowedValues()) {
if (!getAllowedValues()
.equals(other.getAllowedValues())) return false;
}
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@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();
if (hasAllowedValues()) {
hash = (37 * hash) + ALLOWED_VALUES_FIELD_NUMBER;
hash = (53 * hash) + getAllowedValues().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.tensorflow.framework.KernelDef.AttrConstraint parseFrom(
java.nio.ByteBuffer data)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.framework.KernelDef.AttrConstraint parseFrom(
java.nio.ByteBuffer data,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tensorflow.framework.KernelDef.AttrConstraint parseFrom(
org.nd4j.shade.protobuf.ByteString data)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.framework.KernelDef.AttrConstraint 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 org.tensorflow.framework.KernelDef.AttrConstraint parseFrom(byte[] data)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.framework.KernelDef.AttrConstraint parseFrom(
byte[] data,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tensorflow.framework.KernelDef.AttrConstraint parseFrom(java.io.InputStream input)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tensorflow.framework.KernelDef.AttrConstraint 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 org.tensorflow.framework.KernelDef.AttrConstraint parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.tensorflow.framework.KernelDef.AttrConstraint 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 org.tensorflow.framework.KernelDef.AttrConstraint parseFrom(
org.nd4j.shade.protobuf.CodedInputStream input)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tensorflow.framework.KernelDef.AttrConstraint 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);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.tensorflow.framework.KernelDef.AttrConstraint prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
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;
}
/**
* Protobuf type {@code tensorflow.KernelDef.AttrConstraint}
*/
public static final class Builder extends
org.nd4j.shade.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:tensorflow.KernelDef.AttrConstraint)
org.tensorflow.framework.KernelDef.AttrConstraintOrBuilder {
public static final org.nd4j.shade.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tensorflow.framework.KernelDefProtos.internal_static_tensorflow_KernelDef_AttrConstraint_descriptor;
}
@java.lang.Override
protected org.nd4j.shade.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tensorflow.framework.KernelDefProtos.internal_static_tensorflow_KernelDef_AttrConstraint_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tensorflow.framework.KernelDef.AttrConstraint.class, org.tensorflow.framework.KernelDef.AttrConstraint.Builder.class);
}
// Construct using org.tensorflow.framework.KernelDef.AttrConstraint.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) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
name_ = "";
if (allowedValuesBuilder_ == null) {
allowedValues_ = null;
} else {
allowedValues_ = null;
allowedValuesBuilder_ = null;
}
return this;
}
@java.lang.Override
public org.nd4j.shade.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.tensorflow.framework.KernelDefProtos.internal_static_tensorflow_KernelDef_AttrConstraint_descriptor;
}
@java.lang.Override
public org.tensorflow.framework.KernelDef.AttrConstraint getDefaultInstanceForType() {
return org.tensorflow.framework.KernelDef.AttrConstraint.getDefaultInstance();
}
@java.lang.Override
public org.tensorflow.framework.KernelDef.AttrConstraint build() {
org.tensorflow.framework.KernelDef.AttrConstraint result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.tensorflow.framework.KernelDef.AttrConstraint buildPartial() {
org.tensorflow.framework.KernelDef.AttrConstraint result = new org.tensorflow.framework.KernelDef.AttrConstraint(this);
result.name_ = name_;
if (allowedValuesBuilder_ == null) {
result.allowedValues_ = allowedValues_;
} else {
result.allowedValues_ = allowedValuesBuilder_.build();
}
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
org.nd4j.shade.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
org.nd4j.shade.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
org.nd4j.shade.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
org.nd4j.shade.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
org.nd4j.shade.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(org.nd4j.shade.protobuf.Message other) {
if (other instanceof org.tensorflow.framework.KernelDef.AttrConstraint) {
return mergeFrom((org.tensorflow.framework.KernelDef.AttrConstraint)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.tensorflow.framework.KernelDef.AttrConstraint other) {
if (other == org.tensorflow.framework.KernelDef.AttrConstraint.getDefaultInstance()) return this;
if (!other.getName().isEmpty()) {
name_ = other.name_;
onChanged();
}
if (other.hasAllowedValues()) {
mergeAllowedValues(other.getAllowedValues());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
org.nd4j.shade.protobuf.CodedInputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.tensorflow.framework.KernelDef.AttrConstraint parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (org.nd4j.shade.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.tensorflow.framework.KernelDef.AttrConstraint) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object name_ = "";
/**
*
* Name of an attr from the Op.
*
*
* string name = 1;
* @return The name.
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (!(ref instanceof java.lang.String)) {
org.nd4j.shade.protobuf.ByteString bs =
(org.nd4j.shade.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Name of an attr from the Op.
*
*
* string name = 1;
* @return The bytes for name.
*/
public org.nd4j.shade.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof 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;
}
}
/**
*
* Name of an attr from the Op.
*
*
* string name = 1;
* @param value The name to set.
* @return This builder for chaining.
*/
public Builder setName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
name_ = value;
onChanged();
return this;
}
/**
*
* Name of an attr from the Op.
*
*
* string name = 1;
* @return This builder for chaining.
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
onChanged();
return this;
}
/**
*
* Name of an attr from the Op.
*
*
* string name = 1;
* @param value The bytes for name to set.
* @return This builder for chaining.
*/
public Builder setNameBytes(
org.nd4j.shade.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
name_ = value;
onChanged();
return this;
}
private org.tensorflow.framework.AttrValue allowedValues_;
private org.nd4j.shade.protobuf.SingleFieldBuilderV3<
org.tensorflow.framework.AttrValue, org.tensorflow.framework.AttrValue.Builder, org.tensorflow.framework.AttrValueOrBuilder> allowedValuesBuilder_;
/**
*
* A list of values that this kernel supports for this attr.
* Like OpDef.AttrDef.allowed_values, except for kernels instead of Ops.
*
*
* .tensorflow.AttrValue allowed_values = 2;
* @return Whether the allowedValues field is set.
*/
public boolean hasAllowedValues() {
return allowedValuesBuilder_ != null || allowedValues_ != null;
}
/**
*
* A list of values that this kernel supports for this attr.
* Like OpDef.AttrDef.allowed_values, except for kernels instead of Ops.
*
*
* string device_type = 2;
* @return The bytes for deviceType.
*/
@java.lang.Override
public org.nd4j.shade.protobuf.ByteString
getDeviceTypeBytes() {
java.lang.Object ref = deviceType_;
if (ref instanceof java.lang.String) {
org.nd4j.shade.protobuf.ByteString b =
org.nd4j.shade.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
deviceType_ = b;
return b;
} else {
return (org.nd4j.shade.protobuf.ByteString) ref;
}
}
public static final int CONSTRAINT_FIELD_NUMBER = 3;
private java.util.List constraint_;
/**
* repeated .tensorflow.KernelDef.AttrConstraint constraint = 3;
*/
@java.lang.Override
public java.util.List getConstraintList() {
return constraint_;
}
/**
* repeated .tensorflow.KernelDef.AttrConstraint constraint = 3;
*/
@java.lang.Override
public java.util.List
getConstraintOrBuilderList() {
return constraint_;
}
/**
* repeated .tensorflow.KernelDef.AttrConstraint constraint = 3;
*/
@java.lang.Override
public int getConstraintCount() {
return constraint_.size();
}
/**
* repeated .tensorflow.KernelDef.AttrConstraint constraint = 3;
*/
@java.lang.Override
public org.tensorflow.framework.KernelDef.AttrConstraint getConstraint(int index) {
return constraint_.get(index);
}
/**
* repeated .tensorflow.KernelDef.AttrConstraint constraint = 3;
*/
@java.lang.Override
public org.tensorflow.framework.KernelDef.AttrConstraintOrBuilder getConstraintOrBuilder(
int index) {
return constraint_.get(index);
}
public static final int HOST_MEMORY_ARG_FIELD_NUMBER = 4;
private org.nd4j.shade.protobuf.LazyStringList hostMemoryArg_;
/**
*
* Names of the Op's input_/output_args that reside in host memory
* instead of device memory.
*
*
* repeated string host_memory_arg = 4;
* @return A list containing the hostMemoryArg.
*/
public org.nd4j.shade.protobuf.ProtocolStringList
getHostMemoryArgList() {
return hostMemoryArg_;
}
/**
*
* Names of the Op's input_/output_args that reside in host memory
* instead of device memory.
*
*
* repeated string host_memory_arg = 4;
* @return The count of hostMemoryArg.
*/
public int getHostMemoryArgCount() {
return hostMemoryArg_.size();
}
/**
*
* Names of the Op's input_/output_args that reside in host memory
* instead of device memory.
*
*
* repeated string host_memory_arg = 4;
* @param index The index of the element to return.
* @return The hostMemoryArg at the given index.
*/
public java.lang.String getHostMemoryArg(int index) {
return hostMemoryArg_.get(index);
}
/**
*
* Names of the Op's input_/output_args that reside in host memory
* instead of device memory.
*
*
* repeated string host_memory_arg = 4;
* @param index The index of the value to return.
* @return The bytes of the hostMemoryArg at the given index.
*/
public org.nd4j.shade.protobuf.ByteString
getHostMemoryArgBytes(int index) {
return hostMemoryArg_.getByteString(index);
}
public static final int LABEL_FIELD_NUMBER = 5;
private volatile java.lang.Object label_;
/**
*
* This allows experimental kernels to be registered for an op that
* won't be used unless the user specifies a "_kernel" attr with
* value matching this.
*
* This allows experimental kernels to be registered for an op that
* won't be used unless the user specifies a "_kernel" attr with
* value matching this.
*
*
* string label = 5;
* @return The bytes for label.
*/
@java.lang.Override
public org.nd4j.shade.protobuf.ByteString
getLabelBytes() {
java.lang.Object ref = label_;
if (ref instanceof java.lang.String) {
org.nd4j.shade.protobuf.ByteString b =
org.nd4j.shade.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
label_ = b;
return b;
} else {
return (org.nd4j.shade.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(org.nd4j.shade.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!getOpBytes().isEmpty()) {
org.nd4j.shade.protobuf.GeneratedMessageV3.writeString(output, 1, op_);
}
if (!getDeviceTypeBytes().isEmpty()) {
org.nd4j.shade.protobuf.GeneratedMessageV3.writeString(output, 2, deviceType_);
}
for (int i = 0; i < constraint_.size(); i++) {
output.writeMessage(3, constraint_.get(i));
}
for (int i = 0; i < hostMemoryArg_.size(); i++) {
org.nd4j.shade.protobuf.GeneratedMessageV3.writeString(output, 4, hostMemoryArg_.getRaw(i));
}
if (!getLabelBytes().isEmpty()) {
org.nd4j.shade.protobuf.GeneratedMessageV3.writeString(output, 5, label_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getOpBytes().isEmpty()) {
size += org.nd4j.shade.protobuf.GeneratedMessageV3.computeStringSize(1, op_);
}
if (!getDeviceTypeBytes().isEmpty()) {
size += org.nd4j.shade.protobuf.GeneratedMessageV3.computeStringSize(2, deviceType_);
}
for (int i = 0; i < constraint_.size(); i++) {
size += org.nd4j.shade.protobuf.CodedOutputStream
.computeMessageSize(3, constraint_.get(i));
}
{
int dataSize = 0;
for (int i = 0; i < hostMemoryArg_.size(); i++) {
dataSize += computeStringSizeNoTag(hostMemoryArg_.getRaw(i));
}
size += dataSize;
size += 1 * getHostMemoryArgList().size();
}
if (!getLabelBytes().isEmpty()) {
size += org.nd4j.shade.protobuf.GeneratedMessageV3.computeStringSize(5, label_);
}
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 org.tensorflow.framework.KernelDef)) {
return super.equals(obj);
}
org.tensorflow.framework.KernelDef other = (org.tensorflow.framework.KernelDef) obj;
if (!getOp()
.equals(other.getOp())) return false;
if (!getDeviceType()
.equals(other.getDeviceType())) return false;
if (!getConstraintList()
.equals(other.getConstraintList())) return false;
if (!getHostMemoryArgList()
.equals(other.getHostMemoryArgList())) return false;
if (!getLabel()
.equals(other.getLabel())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + OP_FIELD_NUMBER;
hash = (53 * hash) + getOp().hashCode();
hash = (37 * hash) + DEVICE_TYPE_FIELD_NUMBER;
hash = (53 * hash) + getDeviceType().hashCode();
if (getConstraintCount() > 0) {
hash = (37 * hash) + CONSTRAINT_FIELD_NUMBER;
hash = (53 * hash) + getConstraintList().hashCode();
}
if (getHostMemoryArgCount() > 0) {
hash = (37 * hash) + HOST_MEMORY_ARG_FIELD_NUMBER;
hash = (53 * hash) + getHostMemoryArgList().hashCode();
}
hash = (37 * hash) + LABEL_FIELD_NUMBER;
hash = (53 * hash) + getLabel().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.tensorflow.framework.KernelDef parseFrom(
java.nio.ByteBuffer data)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.framework.KernelDef parseFrom(
java.nio.ByteBuffer data,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tensorflow.framework.KernelDef parseFrom(
org.nd4j.shade.protobuf.ByteString data)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.framework.KernelDef 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 org.tensorflow.framework.KernelDef parseFrom(byte[] data)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.framework.KernelDef parseFrom(
byte[] data,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tensorflow.framework.KernelDef parseFrom(java.io.InputStream input)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tensorflow.framework.KernelDef 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 org.tensorflow.framework.KernelDef parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.tensorflow.framework.KernelDef 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 org.tensorflow.framework.KernelDef parseFrom(
org.nd4j.shade.protobuf.CodedInputStream input)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tensorflow.framework.KernelDef 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);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.tensorflow.framework.KernelDef prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
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;
}
/**
* Protobuf type {@code tensorflow.KernelDef}
*/
public static final class Builder extends
org.nd4j.shade.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:tensorflow.KernelDef)
org.tensorflow.framework.KernelDefOrBuilder {
public static final org.nd4j.shade.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tensorflow.framework.KernelDefProtos.internal_static_tensorflow_KernelDef_descriptor;
}
@java.lang.Override
protected org.nd4j.shade.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tensorflow.framework.KernelDefProtos.internal_static_tensorflow_KernelDef_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tensorflow.framework.KernelDef.class, org.tensorflow.framework.KernelDef.Builder.class);
}
// Construct using org.tensorflow.framework.KernelDef.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) {
getConstraintFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
op_ = "";
deviceType_ = "";
if (constraintBuilder_ == null) {
constraint_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
} else {
constraintBuilder_.clear();
}
hostMemoryArg_ = org.nd4j.shade.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000002);
label_ = "";
return this;
}
@java.lang.Override
public org.nd4j.shade.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.tensorflow.framework.KernelDefProtos.internal_static_tensorflow_KernelDef_descriptor;
}
@java.lang.Override
public org.tensorflow.framework.KernelDef getDefaultInstanceForType() {
return org.tensorflow.framework.KernelDef.getDefaultInstance();
}
@java.lang.Override
public org.tensorflow.framework.KernelDef build() {
org.tensorflow.framework.KernelDef result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.tensorflow.framework.KernelDef buildPartial() {
org.tensorflow.framework.KernelDef result = new org.tensorflow.framework.KernelDef(this);
int from_bitField0_ = bitField0_;
result.op_ = op_;
result.deviceType_ = deviceType_;
if (constraintBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
constraint_ = java.util.Collections.unmodifiableList(constraint_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.constraint_ = constraint_;
} else {
result.constraint_ = constraintBuilder_.build();
}
if (((bitField0_ & 0x00000002) != 0)) {
hostMemoryArg_ = hostMemoryArg_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000002);
}
result.hostMemoryArg_ = hostMemoryArg_;
result.label_ = label_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
org.nd4j.shade.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
org.nd4j.shade.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
org.nd4j.shade.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
org.nd4j.shade.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
org.nd4j.shade.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(org.nd4j.shade.protobuf.Message other) {
if (other instanceof org.tensorflow.framework.KernelDef) {
return mergeFrom((org.tensorflow.framework.KernelDef)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.tensorflow.framework.KernelDef other) {
if (other == org.tensorflow.framework.KernelDef.getDefaultInstance()) return this;
if (!other.getOp().isEmpty()) {
op_ = other.op_;
onChanged();
}
if (!other.getDeviceType().isEmpty()) {
deviceType_ = other.deviceType_;
onChanged();
}
if (constraintBuilder_ == null) {
if (!other.constraint_.isEmpty()) {
if (constraint_.isEmpty()) {
constraint_ = other.constraint_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureConstraintIsMutable();
constraint_.addAll(other.constraint_);
}
onChanged();
}
} else {
if (!other.constraint_.isEmpty()) {
if (constraintBuilder_.isEmpty()) {
constraintBuilder_.dispose();
constraintBuilder_ = null;
constraint_ = other.constraint_;
bitField0_ = (bitField0_ & ~0x00000001);
constraintBuilder_ =
org.nd4j.shade.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getConstraintFieldBuilder() : null;
} else {
constraintBuilder_.addAllMessages(other.constraint_);
}
}
}
if (!other.hostMemoryArg_.isEmpty()) {
if (hostMemoryArg_.isEmpty()) {
hostMemoryArg_ = other.hostMemoryArg_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureHostMemoryArgIsMutable();
hostMemoryArg_.addAll(other.hostMemoryArg_);
}
onChanged();
}
if (!other.getLabel().isEmpty()) {
label_ = other.label_;
onChanged();
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
org.nd4j.shade.protobuf.CodedInputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.tensorflow.framework.KernelDef parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (org.nd4j.shade.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.tensorflow.framework.KernelDef) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object op_ = "";
/**
*
* Must match the name of an Op.
*
*
* string op = 1;
* @return The op.
*/
public java.lang.String getOp() {
java.lang.Object ref = op_;
if (!(ref instanceof java.lang.String)) {
org.nd4j.shade.protobuf.ByteString bs =
(org.nd4j.shade.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
op_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Must match the name of an Op.
*
*
* string op = 1;
* @return The bytes for op.
*/
public org.nd4j.shade.protobuf.ByteString
getOpBytes() {
java.lang.Object ref = op_;
if (ref instanceof String) {
org.nd4j.shade.protobuf.ByteString b =
org.nd4j.shade.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
op_ = b;
return b;
} else {
return (org.nd4j.shade.protobuf.ByteString) ref;
}
}
/**
*
* Must match the name of an Op.
*
*
* string op = 1;
* @param value The op to set.
* @return This builder for chaining.
*/
public Builder setOp(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
op_ = value;
onChanged();
return this;
}
/**
*
* Must match the name of an Op.
*
*
* string op = 1;
* @return This builder for chaining.
*/
public Builder clearOp() {
op_ = getDefaultInstance().getOp();
onChanged();
return this;
}
/**
*
* Must match the name of an Op.
*
*
* string op = 1;
* @param value The bytes for op to set.
* @return This builder for chaining.
*/
public Builder setOpBytes(
org.nd4j.shade.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
op_ = value;
onChanged();
return this;
}
private java.lang.Object deviceType_ = "";
/**
*
* Names of the Op's input_/output_args that reside in host memory
* instead of device memory.
*
*
* repeated string host_memory_arg = 4;
* @return A list containing the hostMemoryArg.
*/
public org.nd4j.shade.protobuf.ProtocolStringList
getHostMemoryArgList() {
return hostMemoryArg_.getUnmodifiableView();
}
/**
*
* Names of the Op's input_/output_args that reside in host memory
* instead of device memory.
*
*
* repeated string host_memory_arg = 4;
* @return The count of hostMemoryArg.
*/
public int getHostMemoryArgCount() {
return hostMemoryArg_.size();
}
/**
*
* Names of the Op's input_/output_args that reside in host memory
* instead of device memory.
*
*
* repeated string host_memory_arg = 4;
* @param index The index of the element to return.
* @return The hostMemoryArg at the given index.
*/
public java.lang.String getHostMemoryArg(int index) {
return hostMemoryArg_.get(index);
}
/**
*
* Names of the Op's input_/output_args that reside in host memory
* instead of device memory.
*
*
* repeated string host_memory_arg = 4;
* @param index The index of the value to return.
* @return The bytes of the hostMemoryArg at the given index.
*/
public org.nd4j.shade.protobuf.ByteString
getHostMemoryArgBytes(int index) {
return hostMemoryArg_.getByteString(index);
}
/**
*
* Names of the Op's input_/output_args that reside in host memory
* instead of device memory.
*
*
* repeated string host_memory_arg = 4;
* @param index The index to set the value at.
* @param value The hostMemoryArg to set.
* @return This builder for chaining.
*/
public Builder setHostMemoryArg(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureHostMemoryArgIsMutable();
hostMemoryArg_.set(index, value);
onChanged();
return this;
}
/**
*
* Names of the Op's input_/output_args that reside in host memory
* instead of device memory.
*
*
* repeated string host_memory_arg = 4;
* @param value The hostMemoryArg to add.
* @return This builder for chaining.
*/
public Builder addHostMemoryArg(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureHostMemoryArgIsMutable();
hostMemoryArg_.add(value);
onChanged();
return this;
}
/**
*
* Names of the Op's input_/output_args that reside in host memory
* instead of device memory.
*
*
* repeated string host_memory_arg = 4;
* @param values The hostMemoryArg to add.
* @return This builder for chaining.
*/
public Builder addAllHostMemoryArg(
java.lang.Iterable values) {
ensureHostMemoryArgIsMutable();
org.nd4j.shade.protobuf.AbstractMessageLite.Builder.addAll(
values, hostMemoryArg_);
onChanged();
return this;
}
/**
*
* Names of the Op's input_/output_args that reside in host memory
* instead of device memory.
*
* Names of the Op's input_/output_args that reside in host memory
* instead of device memory.
*
*
* repeated string host_memory_arg = 4;
* @param value The bytes of the hostMemoryArg to add.
* @return This builder for chaining.
*/
public Builder addHostMemoryArgBytes(
org.nd4j.shade.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureHostMemoryArgIsMutable();
hostMemoryArg_.add(value);
onChanged();
return this;
}
private java.lang.Object label_ = "";
/**
*
* This allows experimental kernels to be registered for an op that
* won't be used unless the user specifies a "_kernel" attr with
* value matching this.
*
* This allows experimental kernels to be registered for an op that
* won't be used unless the user specifies a "_kernel" attr with
* value matching this.
*
*
* string label = 5;
* @return The bytes for label.
*/
public org.nd4j.shade.protobuf.ByteString
getLabelBytes() {
java.lang.Object ref = label_;
if (ref instanceof String) {
org.nd4j.shade.protobuf.ByteString b =
org.nd4j.shade.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
label_ = b;
return b;
} else {
return (org.nd4j.shade.protobuf.ByteString) ref;
}
}
/**
*
* This allows experimental kernels to be registered for an op that
* won't be used unless the user specifies a "_kernel" attr with
* value matching this.
*
*
* string label = 5;
* @param value The label to set.
* @return This builder for chaining.
*/
public Builder setLabel(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
label_ = value;
onChanged();
return this;
}
/**
*
* This allows experimental kernels to be registered for an op that
* won't be used unless the user specifies a "_kernel" attr with
* value matching this.
*
*
* string label = 5;
* @return This builder for chaining.
*/
public Builder clearLabel() {
label_ = getDefaultInstance().getLabel();
onChanged();
return this;
}
/**
*
* This allows experimental kernels to be registered for an op that
* won't be used unless the user specifies a "_kernel" attr with
* value matching this.
*
*
* string label = 5;
* @param value The bytes for label to set.
* @return This builder for chaining.
*/
public Builder setLabelBytes(
org.nd4j.shade.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
label_ = value;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final org.nd4j.shade.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final org.nd4j.shade.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:tensorflow.KernelDef)
}
// @@protoc_insertion_point(class_scope:tensorflow.KernelDef)
private static final org.tensorflow.framework.KernelDef DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.tensorflow.framework.KernelDef();
}
public static org.tensorflow.framework.KernelDef getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final org.nd4j.shade.protobuf.Parser
PARSER = new org.nd4j.shade.protobuf.AbstractParser() {
@java.lang.Override
public KernelDef parsePartialFrom(
org.nd4j.shade.protobuf.CodedInputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return new KernelDef(input, extensionRegistry);
}
};
public static org.nd4j.shade.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public org.nd4j.shade.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public org.tensorflow.framework.KernelDef getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}