All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.tensorflow.framework.NodeDef Maven / Gradle / Ivy

There is a newer version: 1.0.0-M2.1
Show newest version
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: tensorflow/core/framework/node_def.proto

package org.tensorflow.framework;

/**
 * Protobuf type {@code tensorflow.NodeDef}
 */
public  final class NodeDef extends
    org.nd4j.shade.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:tensorflow.NodeDef)
    NodeDefOrBuilder {
private static final long serialVersionUID = 0L;
  // Use NodeDef.newBuilder() to construct.
  private NodeDef(org.nd4j.shade.protobuf.GeneratedMessageV3.Builder builder) {
    super(builder);
  }
  private NodeDef() {
    name_ = "";
    op_ = "";
    input_ = org.nd4j.shade.protobuf.LazyStringArrayList.EMPTY;
    device_ = "";
  }

  @java.lang.Override
  @SuppressWarnings({"unused"})
  protected java.lang.Object newInstance(
      UnusedPrivateParameter unused) {
    return new NodeDef();
  }

  @java.lang.Override
  public final org.nd4j.shade.protobuf.UnknownFieldSet
  getUnknownFields() {
    return this.unknownFields;
  }
  private NodeDef(
      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;
          case 10: {
            java.lang.String s = input.readStringRequireUtf8();

            name_ = s;
            break;
          }
          case 18: {
            java.lang.String s = input.readStringRequireUtf8();

            op_ = s;
            break;
          }
          case 26: {
            java.lang.String s = input.readStringRequireUtf8();
            if (!((mutable_bitField0_ & 0x00000001) != 0)) {
              input_ = new org.nd4j.shade.protobuf.LazyStringArrayList();
              mutable_bitField0_ |= 0x00000001;
            }
            input_.add(s);
            break;
          }
          case 34: {
            java.lang.String s = input.readStringRequireUtf8();

            device_ = s;
            break;
          }
          case 42: {
            if (!((mutable_bitField0_ & 0x00000002) != 0)) {
              attr_ = org.nd4j.shade.protobuf.MapField.newMapField(
                  AttrDefaultEntryHolder.defaultEntry);
              mutable_bitField0_ |= 0x00000002;
            }
            org.nd4j.shade.protobuf.MapEntry
            attr__ = input.readMessage(
                AttrDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
            attr_.getMutableMap().put(
                attr__.getKey(), attr__.getValue());
            break;
          }
          default: {
            if (!parseUnknownField(
                input, unknownFields, extensionRegistry, tag)) {
              done = true;
            }
            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) != 0)) {
        input_ = input_.getUnmodifiableView();
      }
      this.unknownFields = unknownFields.build();
      makeExtensionsImmutable();
    }
  }
  public static final org.nd4j.shade.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return org.tensorflow.framework.NodeProto.internal_static_tensorflow_NodeDef_descriptor;
  }

  @SuppressWarnings({"rawtypes"})
  @java.lang.Override
  protected org.nd4j.shade.protobuf.MapField internalGetMapField(
      int number) {
    switch (number) {
      case 5:
        return internalGetAttr();
      default:
        throw new RuntimeException(
            "Invalid map field number: " + number);
    }
  }
  @java.lang.Override
  protected org.nd4j.shade.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return org.tensorflow.framework.NodeProto.internal_static_tensorflow_NodeDef_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            org.tensorflow.framework.NodeDef.class, org.tensorflow.framework.NodeDef.Builder.class);
  }

  public static final int NAME_FIELD_NUMBER = 1;
  private volatile java.lang.Object name_;
  /**
   * 
   * The name given to this operator. Used for naming inputs,
   * logging, visualization, etc.  Unique within a single GraphDef.
   * Must match the regexp "[A-Za-z0-9.][A-Za-z0-9_./]*".
   * 
* * string name = 1; */ public java.lang.String getName() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { org.nd4j.shade.protobuf.ByteString bs = (org.nd4j.shade.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; } } /** *
   * The name given to this operator. Used for naming inputs,
   * logging, visualization, etc.  Unique within a single GraphDef.
   * Must match the regexp "[A-Za-z0-9.][A-Za-z0-9_./]*".
   * 
* * string name = 1; */ 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 OP_FIELD_NUMBER = 2; private volatile java.lang.Object op_; /** *
   * The operation name.  There may be custom parameters in attrs.
   * Op names starting with an underscore are reserved for internal use.
   * 
* * string op = 2; */ public java.lang.String getOp() { java.lang.Object ref = op_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { org.nd4j.shade.protobuf.ByteString bs = (org.nd4j.shade.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); op_ = s; return s; } } /** *
   * The operation name.  There may be custom parameters in attrs.
   * Op names starting with an underscore are reserved for internal use.
   * 
* * string op = 2; */ public org.nd4j.shade.protobuf.ByteString getOpBytes() { java.lang.Object ref = op_; if (ref instanceof java.lang.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; } } public static final int INPUT_FIELD_NUMBER = 3; private org.nd4j.shade.protobuf.LazyStringList input_; /** *
   * Each input is "node:src_output" with "node" being a string name and
   * "src_output" indicating which output tensor to use from "node". If
   * "src_output" is 0 the ":0" suffix can be omitted.  Regular inputs
   * may optionally be followed by control inputs that have the format
   * "^node".
   * 
* * repeated string input = 3; */ public org.nd4j.shade.protobuf.ProtocolStringList getInputList() { return input_; } /** *
   * Each input is "node:src_output" with "node" being a string name and
   * "src_output" indicating which output tensor to use from "node". If
   * "src_output" is 0 the ":0" suffix can be omitted.  Regular inputs
   * may optionally be followed by control inputs that have the format
   * "^node".
   * 
* * repeated string input = 3; */ public int getInputCount() { return input_.size(); } /** *
   * Each input is "node:src_output" with "node" being a string name and
   * "src_output" indicating which output tensor to use from "node". If
   * "src_output" is 0 the ":0" suffix can be omitted.  Regular inputs
   * may optionally be followed by control inputs that have the format
   * "^node".
   * 
* * repeated string input = 3; */ public java.lang.String getInput(int index) { return input_.get(index); } /** *
   * Each input is "node:src_output" with "node" being a string name and
   * "src_output" indicating which output tensor to use from "node". If
   * "src_output" is 0 the ":0" suffix can be omitted.  Regular inputs
   * may optionally be followed by control inputs that have the format
   * "^node".
   * 
* * repeated string input = 3; */ public org.nd4j.shade.protobuf.ByteString getInputBytes(int index) { return input_.getByteString(index); } public static final int DEVICE_FIELD_NUMBER = 4; private volatile java.lang.Object device_; /** *
   * A (possibly partial) specification for the device on which this
   * node should be placed.
   * The expected syntax for this string is as follows:
   * DEVICE_SPEC ::= PARTIAL_SPEC
   * PARTIAL_SPEC ::= ("/" CONSTRAINT) *
   * CONSTRAINT ::= ("job:" JOB_NAME)
   *              | ("replica:" [1-9][0-9]*)
   *              | ("task:" [1-9][0-9]*)
   *              | ("device:" [A-Za-z]* ":" ([1-9][0-9]* | "*") )
   * Valid values for this string include:
   * * "/job:worker/replica:0/task:1/device:GPU:3"  (full specification)
   * * "/job:worker/device:GPU:3"                   (partial specification)
   * * ""                                    (no specification)
   * If the constraints do not resolve to a single device (or if this
   * field is empty or not present), the runtime will attempt to
   * choose a device automatically.
   * 
* * string device = 4; */ public java.lang.String getDevice() { java.lang.Object ref = device_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { org.nd4j.shade.protobuf.ByteString bs = (org.nd4j.shade.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); device_ = s; return s; } } /** *
   * A (possibly partial) specification for the device on which this
   * node should be placed.
   * The expected syntax for this string is as follows:
   * DEVICE_SPEC ::= PARTIAL_SPEC
   * PARTIAL_SPEC ::= ("/" CONSTRAINT) *
   * CONSTRAINT ::= ("job:" JOB_NAME)
   *              | ("replica:" [1-9][0-9]*)
   *              | ("task:" [1-9][0-9]*)
   *              | ("device:" [A-Za-z]* ":" ([1-9][0-9]* | "*") )
   * Valid values for this string include:
   * * "/job:worker/replica:0/task:1/device:GPU:3"  (full specification)
   * * "/job:worker/device:GPU:3"                   (partial specification)
   * * ""                                    (no specification)
   * If the constraints do not resolve to a single device (or if this
   * field is empty or not present), the runtime will attempt to
   * choose a device automatically.
   * 
* * string device = 4; */ public org.nd4j.shade.protobuf.ByteString getDeviceBytes() { java.lang.Object ref = device_; if (ref instanceof java.lang.String) { org.nd4j.shade.protobuf.ByteString b = org.nd4j.shade.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); device_ = b; return b; } else { return (org.nd4j.shade.protobuf.ByteString) ref; } } public static final int ATTR_FIELD_NUMBER = 5; private static final class AttrDefaultEntryHolder { static final org.nd4j.shade.protobuf.MapEntry< java.lang.String, org.tensorflow.framework.AttrValue> defaultEntry = org.nd4j.shade.protobuf.MapEntry .newDefaultInstance( org.tensorflow.framework.NodeProto.internal_static_tensorflow_NodeDef_AttrEntry_descriptor, org.nd4j.shade.protobuf.WireFormat.FieldType.STRING, "", org.nd4j.shade.protobuf.WireFormat.FieldType.MESSAGE, org.tensorflow.framework.AttrValue.getDefaultInstance()); } private org.nd4j.shade.protobuf.MapField< java.lang.String, org.tensorflow.framework.AttrValue> attr_; private org.nd4j.shade.protobuf.MapField internalGetAttr() { if (attr_ == null) { return org.nd4j.shade.protobuf.MapField.emptyMapField( AttrDefaultEntryHolder.defaultEntry); } return attr_; } public int getAttrCount() { return internalGetAttr().getMap().size(); } /** *
   * Operation-specific graph-construction-time configuration.
   * Note that this should include all attrs defined in the
   * corresponding OpDef, including those with a value matching
   * the default -- this allows the default to change and makes
   * NodeDefs easier to interpret on their own.  However, if
   * an attr with a default is not specified in this list, the
   * default will be used.
   * The "names" (keys) must match the regexp "[a-z][a-z0-9_]+" (and
   * one of the names from the corresponding OpDef's attr field).
   * The values must have a type matching the corresponding OpDef
   * attr's type field.
   * TODO(josh11b): Add some examples here showing best practices.
   * 
* * map<string, .tensorflow.AttrValue> attr = 5; */ public boolean containsAttr( java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); } return internalGetAttr().getMap().containsKey(key); } /** * Use {@link #getAttrMap()} instead. */ @java.lang.Deprecated public java.util.Map getAttr() { return getAttrMap(); } /** *
   * Operation-specific graph-construction-time configuration.
   * Note that this should include all attrs defined in the
   * corresponding OpDef, including those with a value matching
   * the default -- this allows the default to change and makes
   * NodeDefs easier to interpret on their own.  However, if
   * an attr with a default is not specified in this list, the
   * default will be used.
   * The "names" (keys) must match the regexp "[a-z][a-z0-9_]+" (and
   * one of the names from the corresponding OpDef's attr field).
   * The values must have a type matching the corresponding OpDef
   * attr's type field.
   * TODO(josh11b): Add some examples here showing best practices.
   * 
* * map<string, .tensorflow.AttrValue> attr = 5; */ public java.util.Map getAttrMap() { return internalGetAttr().getMap(); } /** *
   * Operation-specific graph-construction-time configuration.
   * Note that this should include all attrs defined in the
   * corresponding OpDef, including those with a value matching
   * the default -- this allows the default to change and makes
   * NodeDefs easier to interpret on their own.  However, if
   * an attr with a default is not specified in this list, the
   * default will be used.
   * The "names" (keys) must match the regexp "[a-z][a-z0-9_]+" (and
   * one of the names from the corresponding OpDef's attr field).
   * The values must have a type matching the corresponding OpDef
   * attr's type field.
   * TODO(josh11b): Add some examples here showing best practices.
   * 
* * map<string, .tensorflow.AttrValue> attr = 5; */ public org.tensorflow.framework.AttrValue getAttrOrDefault( java.lang.String key, org.tensorflow.framework.AttrValue defaultValue) { if (key == null) { throw new java.lang.NullPointerException(); } java.util.Map map = internalGetAttr().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** *
   * Operation-specific graph-construction-time configuration.
   * Note that this should include all attrs defined in the
   * corresponding OpDef, including those with a value matching
   * the default -- this allows the default to change and makes
   * NodeDefs easier to interpret on their own.  However, if
   * an attr with a default is not specified in this list, the
   * default will be used.
   * The "names" (keys) must match the regexp "[a-z][a-z0-9_]+" (and
   * one of the names from the corresponding OpDef's attr field).
   * The values must have a type matching the corresponding OpDef
   * attr's type field.
   * TODO(josh11b): Add some examples here showing best practices.
   * 
* * map<string, .tensorflow.AttrValue> attr = 5; */ public org.tensorflow.framework.AttrValue getAttrOrThrow( java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); } java.util.Map map = internalGetAttr().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } 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 (!getOpBytes().isEmpty()) { org.nd4j.shade.protobuf.GeneratedMessageV3.writeString(output, 2, op_); } for (int i = 0; i < input_.size(); i++) { org.nd4j.shade.protobuf.GeneratedMessageV3.writeString(output, 3, input_.getRaw(i)); } if (!getDeviceBytes().isEmpty()) { org.nd4j.shade.protobuf.GeneratedMessageV3.writeString(output, 4, device_); } org.nd4j.shade.protobuf.GeneratedMessageV3 .serializeStringMapTo( output, internalGetAttr(), AttrDefaultEntryHolder.defaultEntry, 5); 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 (!getOpBytes().isEmpty()) { size += org.nd4j.shade.protobuf.GeneratedMessageV3.computeStringSize(2, op_); } { int dataSize = 0; for (int i = 0; i < input_.size(); i++) { dataSize += computeStringSizeNoTag(input_.getRaw(i)); } size += dataSize; size += 1 * getInputList().size(); } if (!getDeviceBytes().isEmpty()) { size += org.nd4j.shade.protobuf.GeneratedMessageV3.computeStringSize(4, device_); } for (java.util.Map.Entry entry : internalGetAttr().getMap().entrySet()) { org.nd4j.shade.protobuf.MapEntry attr__ = AttrDefaultEntryHolder.defaultEntry.newBuilderForType() .setKey(entry.getKey()) .setValue(entry.getValue()) .build(); size += org.nd4j.shade.protobuf.CodedOutputStream .computeMessageSize(5, attr__); } 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.NodeDef)) { return super.equals(obj); } org.tensorflow.framework.NodeDef other = (org.tensorflow.framework.NodeDef) obj; if (!getName() .equals(other.getName())) return false; if (!getOp() .equals(other.getOp())) return false; if (!getInputList() .equals(other.getInputList())) return false; if (!getDevice() .equals(other.getDevice())) return false; if (!internalGetAttr().equals( other.internalGetAttr())) 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(); hash = (37 * hash) + OP_FIELD_NUMBER; hash = (53 * hash) + getOp().hashCode(); if (getInputCount() > 0) { hash = (37 * hash) + INPUT_FIELD_NUMBER; hash = (53 * hash) + getInputList().hashCode(); } hash = (37 * hash) + DEVICE_FIELD_NUMBER; hash = (53 * hash) + getDevice().hashCode(); if (!internalGetAttr().getMap().isEmpty()) { hash = (37 * hash) + ATTR_FIELD_NUMBER; hash = (53 * hash) + internalGetAttr().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static org.tensorflow.framework.NodeDef parseFrom( java.nio.ByteBuffer data) throws org.nd4j.shade.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.tensorflow.framework.NodeDef 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.NodeDef parseFrom( org.nd4j.shade.protobuf.ByteString data) throws org.nd4j.shade.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.tensorflow.framework.NodeDef 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.NodeDef parseFrom(byte[] data) throws org.nd4j.shade.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.tensorflow.framework.NodeDef 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.NodeDef parseFrom(java.io.InputStream input) throws java.io.IOException { return org.nd4j.shade.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static org.tensorflow.framework.NodeDef 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.NodeDef parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return org.nd4j.shade.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static org.tensorflow.framework.NodeDef 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.NodeDef 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.NodeDef 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.NodeDef 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.NodeDef} */ public static final class Builder extends org.nd4j.shade.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:tensorflow.NodeDef) org.tensorflow.framework.NodeDefOrBuilder { public static final org.nd4j.shade.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.framework.NodeProto.internal_static_tensorflow_NodeDef_descriptor; } @SuppressWarnings({"rawtypes"}) protected org.nd4j.shade.protobuf.MapField internalGetMapField( int number) { switch (number) { case 5: return internalGetAttr(); default: throw new RuntimeException( "Invalid map field number: " + number); } } @SuppressWarnings({"rawtypes"}) protected org.nd4j.shade.protobuf.MapField internalGetMutableMapField( int number) { switch (number) { case 5: return internalGetMutableAttr(); default: throw new RuntimeException( "Invalid map field number: " + number); } } @java.lang.Override protected org.nd4j.shade.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.framework.NodeProto.internal_static_tensorflow_NodeDef_fieldAccessorTable .ensureFieldAccessorsInitialized( org.tensorflow.framework.NodeDef.class, org.tensorflow.framework.NodeDef.Builder.class); } // Construct using org.tensorflow.framework.NodeDef.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_ = ""; op_ = ""; input_ = org.nd4j.shade.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000001); device_ = ""; internalGetMutableAttr().clear(); return this; } @java.lang.Override public org.nd4j.shade.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.tensorflow.framework.NodeProto.internal_static_tensorflow_NodeDef_descriptor; } @java.lang.Override public org.tensorflow.framework.NodeDef getDefaultInstanceForType() { return org.tensorflow.framework.NodeDef.getDefaultInstance(); } @java.lang.Override public org.tensorflow.framework.NodeDef build() { org.tensorflow.framework.NodeDef result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public org.tensorflow.framework.NodeDef buildPartial() { org.tensorflow.framework.NodeDef result = new org.tensorflow.framework.NodeDef(this); int from_bitField0_ = bitField0_; result.name_ = name_; result.op_ = op_; if (((bitField0_ & 0x00000001) != 0)) { input_ = input_.getUnmodifiableView(); bitField0_ = (bitField0_ & ~0x00000001); } result.input_ = input_; result.device_ = device_; result.attr_ = internalGetAttr(); result.attr_.makeImmutable(); 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.NodeDef) { return mergeFrom((org.tensorflow.framework.NodeDef)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(org.tensorflow.framework.NodeDef other) { if (other == org.tensorflow.framework.NodeDef.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; onChanged(); } if (!other.getOp().isEmpty()) { op_ = other.op_; onChanged(); } if (!other.input_.isEmpty()) { if (input_.isEmpty()) { input_ = other.input_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureInputIsMutable(); input_.addAll(other.input_); } onChanged(); } if (!other.getDevice().isEmpty()) { device_ = other.device_; onChanged(); } internalGetMutableAttr().mergeFrom( other.internalGetAttr()); 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.NodeDef parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (org.nd4j.shade.protobuf.InvalidProtocolBufferException e) { parsedMessage = (org.tensorflow.framework.NodeDef) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private java.lang.Object name_ = ""; /** *
     * The name given to this operator. Used for naming inputs,
     * logging, visualization, etc.  Unique within a single GraphDef.
     * Must match the regexp "[A-Za-z0-9.][A-Za-z0-9_./]*".
     * 
* * string name = 1; */ 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; } } /** *
     * The name given to this operator. Used for naming inputs,
     * logging, visualization, etc.  Unique within a single GraphDef.
     * Must match the regexp "[A-Za-z0-9.][A-Za-z0-9_./]*".
     * 
* * string name = 1; */ 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; } } /** *
     * The name given to this operator. Used for naming inputs,
     * logging, visualization, etc.  Unique within a single GraphDef.
     * Must match the regexp "[A-Za-z0-9.][A-Za-z0-9_./]*".
     * 
* * string name = 1; */ public Builder setName( java.lang.String value) { if (value == null) { throw new NullPointerException(); } name_ = value; onChanged(); return this; } /** *
     * The name given to this operator. Used for naming inputs,
     * logging, visualization, etc.  Unique within a single GraphDef.
     * Must match the regexp "[A-Za-z0-9.][A-Za-z0-9_./]*".
     * 
* * string name = 1; */ public Builder clearName() { name_ = getDefaultInstance().getName(); onChanged(); return this; } /** *
     * The name given to this operator. Used for naming inputs,
     * logging, visualization, etc.  Unique within a single GraphDef.
     * Must match the regexp "[A-Za-z0-9.][A-Za-z0-9_./]*".
     * 
* * string name = 1; */ public Builder setNameBytes( org.nd4j.shade.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); name_ = value; onChanged(); return this; } private java.lang.Object op_ = ""; /** *
     * The operation name.  There may be custom parameters in attrs.
     * Op names starting with an underscore are reserved for internal use.
     * 
* * string op = 2; */ 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; } } /** *
     * The operation name.  There may be custom parameters in attrs.
     * Op names starting with an underscore are reserved for internal use.
     * 
* * string op = 2; */ 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; } } /** *
     * The operation name.  There may be custom parameters in attrs.
     * Op names starting with an underscore are reserved for internal use.
     * 
* * string op = 2; */ public Builder setOp( java.lang.String value) { if (value == null) { throw new NullPointerException(); } op_ = value; onChanged(); return this; } /** *
     * The operation name.  There may be custom parameters in attrs.
     * Op names starting with an underscore are reserved for internal use.
     * 
* * string op = 2; */ public Builder clearOp() { op_ = getDefaultInstance().getOp(); onChanged(); return this; } /** *
     * The operation name.  There may be custom parameters in attrs.
     * Op names starting with an underscore are reserved for internal use.
     * 
* * string op = 2; */ public Builder setOpBytes( org.nd4j.shade.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); op_ = value; onChanged(); return this; } private org.nd4j.shade.protobuf.LazyStringList input_ = org.nd4j.shade.protobuf.LazyStringArrayList.EMPTY; private void ensureInputIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { input_ = new org.nd4j.shade.protobuf.LazyStringArrayList(input_); bitField0_ |= 0x00000001; } } /** *
     * Each input is "node:src_output" with "node" being a string name and
     * "src_output" indicating which output tensor to use from "node". If
     * "src_output" is 0 the ":0" suffix can be omitted.  Regular inputs
     * may optionally be followed by control inputs that have the format
     * "^node".
     * 
* * repeated string input = 3; */ public org.nd4j.shade.protobuf.ProtocolStringList getInputList() { return input_.getUnmodifiableView(); } /** *
     * Each input is "node:src_output" with "node" being a string name and
     * "src_output" indicating which output tensor to use from "node". If
     * "src_output" is 0 the ":0" suffix can be omitted.  Regular inputs
     * may optionally be followed by control inputs that have the format
     * "^node".
     * 
* * repeated string input = 3; */ public int getInputCount() { return input_.size(); } /** *
     * Each input is "node:src_output" with "node" being a string name and
     * "src_output" indicating which output tensor to use from "node". If
     * "src_output" is 0 the ":0" suffix can be omitted.  Regular inputs
     * may optionally be followed by control inputs that have the format
     * "^node".
     * 
* * repeated string input = 3; */ public java.lang.String getInput(int index) { return input_.get(index); } /** *
     * Each input is "node:src_output" with "node" being a string name and
     * "src_output" indicating which output tensor to use from "node". If
     * "src_output" is 0 the ":0" suffix can be omitted.  Regular inputs
     * may optionally be followed by control inputs that have the format
     * "^node".
     * 
* * repeated string input = 3; */ public org.nd4j.shade.protobuf.ByteString getInputBytes(int index) { return input_.getByteString(index); } /** *
     * Each input is "node:src_output" with "node" being a string name and
     * "src_output" indicating which output tensor to use from "node". If
     * "src_output" is 0 the ":0" suffix can be omitted.  Regular inputs
     * may optionally be followed by control inputs that have the format
     * "^node".
     * 
* * repeated string input = 3; */ public Builder setInput( int index, java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureInputIsMutable(); input_.set(index, value); onChanged(); return this; } /** *
     * Each input is "node:src_output" with "node" being a string name and
     * "src_output" indicating which output tensor to use from "node". If
     * "src_output" is 0 the ":0" suffix can be omitted.  Regular inputs
     * may optionally be followed by control inputs that have the format
     * "^node".
     * 
* * repeated string input = 3; */ public Builder addInput( java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureInputIsMutable(); input_.add(value); onChanged(); return this; } /** *
     * Each input is "node:src_output" with "node" being a string name and
     * "src_output" indicating which output tensor to use from "node". If
     * "src_output" is 0 the ":0" suffix can be omitted.  Regular inputs
     * may optionally be followed by control inputs that have the format
     * "^node".
     * 
* * repeated string input = 3; */ public Builder addAllInput( java.lang.Iterable values) { ensureInputIsMutable(); org.nd4j.shade.protobuf.AbstractMessageLite.Builder.addAll( values, input_); onChanged(); return this; } /** *
     * Each input is "node:src_output" with "node" being a string name and
     * "src_output" indicating which output tensor to use from "node". If
     * "src_output" is 0 the ":0" suffix can be omitted.  Regular inputs
     * may optionally be followed by control inputs that have the format
     * "^node".
     * 
* * repeated string input = 3; */ public Builder clearInput() { input_ = org.nd4j.shade.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** *
     * Each input is "node:src_output" with "node" being a string name and
     * "src_output" indicating which output tensor to use from "node". If
     * "src_output" is 0 the ":0" suffix can be omitted.  Regular inputs
     * may optionally be followed by control inputs that have the format
     * "^node".
     * 
* * repeated string input = 3; */ public Builder addInputBytes( org.nd4j.shade.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); ensureInputIsMutable(); input_.add(value); onChanged(); return this; } private java.lang.Object device_ = ""; /** *
     * A (possibly partial) specification for the device on which this
     * node should be placed.
     * The expected syntax for this string is as follows:
     * DEVICE_SPEC ::= PARTIAL_SPEC
     * PARTIAL_SPEC ::= ("/" CONSTRAINT) *
     * CONSTRAINT ::= ("job:" JOB_NAME)
     *              | ("replica:" [1-9][0-9]*)
     *              | ("task:" [1-9][0-9]*)
     *              | ("device:" [A-Za-z]* ":" ([1-9][0-9]* | "*") )
     * Valid values for this string include:
     * * "/job:worker/replica:0/task:1/device:GPU:3"  (full specification)
     * * "/job:worker/device:GPU:3"                   (partial specification)
     * * ""                                    (no specification)
     * If the constraints do not resolve to a single device (or if this
     * field is empty or not present), the runtime will attempt to
     * choose a device automatically.
     * 
* * string device = 4; */ public java.lang.String getDevice() { java.lang.Object ref = device_; if (!(ref instanceof java.lang.String)) { org.nd4j.shade.protobuf.ByteString bs = (org.nd4j.shade.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); device_ = s; return s; } else { return (java.lang.String) ref; } } /** *
     * A (possibly partial) specification for the device on which this
     * node should be placed.
     * The expected syntax for this string is as follows:
     * DEVICE_SPEC ::= PARTIAL_SPEC
     * PARTIAL_SPEC ::= ("/" CONSTRAINT) *
     * CONSTRAINT ::= ("job:" JOB_NAME)
     *              | ("replica:" [1-9][0-9]*)
     *              | ("task:" [1-9][0-9]*)
     *              | ("device:" [A-Za-z]* ":" ([1-9][0-9]* | "*") )
     * Valid values for this string include:
     * * "/job:worker/replica:0/task:1/device:GPU:3"  (full specification)
     * * "/job:worker/device:GPU:3"                   (partial specification)
     * * ""                                    (no specification)
     * If the constraints do not resolve to a single device (or if this
     * field is empty or not present), the runtime will attempt to
     * choose a device automatically.
     * 
* * string device = 4; */ public org.nd4j.shade.protobuf.ByteString getDeviceBytes() { java.lang.Object ref = device_; if (ref instanceof String) { org.nd4j.shade.protobuf.ByteString b = org.nd4j.shade.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); device_ = b; return b; } else { return (org.nd4j.shade.protobuf.ByteString) ref; } } /** *
     * A (possibly partial) specification for the device on which this
     * node should be placed.
     * The expected syntax for this string is as follows:
     * DEVICE_SPEC ::= PARTIAL_SPEC
     * PARTIAL_SPEC ::= ("/" CONSTRAINT) *
     * CONSTRAINT ::= ("job:" JOB_NAME)
     *              | ("replica:" [1-9][0-9]*)
     *              | ("task:" [1-9][0-9]*)
     *              | ("device:" [A-Za-z]* ":" ([1-9][0-9]* | "*") )
     * Valid values for this string include:
     * * "/job:worker/replica:0/task:1/device:GPU:3"  (full specification)
     * * "/job:worker/device:GPU:3"                   (partial specification)
     * * ""                                    (no specification)
     * If the constraints do not resolve to a single device (or if this
     * field is empty or not present), the runtime will attempt to
     * choose a device automatically.
     * 
* * string device = 4; */ public Builder setDevice( java.lang.String value) { if (value == null) { throw new NullPointerException(); } device_ = value; onChanged(); return this; } /** *
     * A (possibly partial) specification for the device on which this
     * node should be placed.
     * The expected syntax for this string is as follows:
     * DEVICE_SPEC ::= PARTIAL_SPEC
     * PARTIAL_SPEC ::= ("/" CONSTRAINT) *
     * CONSTRAINT ::= ("job:" JOB_NAME)
     *              | ("replica:" [1-9][0-9]*)
     *              | ("task:" [1-9][0-9]*)
     *              | ("device:" [A-Za-z]* ":" ([1-9][0-9]* | "*") )
     * Valid values for this string include:
     * * "/job:worker/replica:0/task:1/device:GPU:3"  (full specification)
     * * "/job:worker/device:GPU:3"                   (partial specification)
     * * ""                                    (no specification)
     * If the constraints do not resolve to a single device (or if this
     * field is empty or not present), the runtime will attempt to
     * choose a device automatically.
     * 
* * string device = 4; */ public Builder clearDevice() { device_ = getDefaultInstance().getDevice(); onChanged(); return this; } /** *
     * A (possibly partial) specification for the device on which this
     * node should be placed.
     * The expected syntax for this string is as follows:
     * DEVICE_SPEC ::= PARTIAL_SPEC
     * PARTIAL_SPEC ::= ("/" CONSTRAINT) *
     * CONSTRAINT ::= ("job:" JOB_NAME)
     *              | ("replica:" [1-9][0-9]*)
     *              | ("task:" [1-9][0-9]*)
     *              | ("device:" [A-Za-z]* ":" ([1-9][0-9]* | "*") )
     * Valid values for this string include:
     * * "/job:worker/replica:0/task:1/device:GPU:3"  (full specification)
     * * "/job:worker/device:GPU:3"                   (partial specification)
     * * ""                                    (no specification)
     * If the constraints do not resolve to a single device (or if this
     * field is empty or not present), the runtime will attempt to
     * choose a device automatically.
     * 
* * string device = 4; */ public Builder setDeviceBytes( org.nd4j.shade.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); device_ = value; onChanged(); return this; } private org.nd4j.shade.protobuf.MapField< java.lang.String, org.tensorflow.framework.AttrValue> attr_; private org.nd4j.shade.protobuf.MapField internalGetAttr() { if (attr_ == null) { return org.nd4j.shade.protobuf.MapField.emptyMapField( AttrDefaultEntryHolder.defaultEntry); } return attr_; } private org.nd4j.shade.protobuf.MapField internalGetMutableAttr() { onChanged();; if (attr_ == null) { attr_ = org.nd4j.shade.protobuf.MapField.newMapField( AttrDefaultEntryHolder.defaultEntry); } if (!attr_.isMutable()) { attr_ = attr_.copy(); } return attr_; } public int getAttrCount() { return internalGetAttr().getMap().size(); } /** *
     * Operation-specific graph-construction-time configuration.
     * Note that this should include all attrs defined in the
     * corresponding OpDef, including those with a value matching
     * the default -- this allows the default to change and makes
     * NodeDefs easier to interpret on their own.  However, if
     * an attr with a default is not specified in this list, the
     * default will be used.
     * The "names" (keys) must match the regexp "[a-z][a-z0-9_]+" (and
     * one of the names from the corresponding OpDef's attr field).
     * The values must have a type matching the corresponding OpDef
     * attr's type field.
     * TODO(josh11b): Add some examples here showing best practices.
     * 
* * map<string, .tensorflow.AttrValue> attr = 5; */ public boolean containsAttr( java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); } return internalGetAttr().getMap().containsKey(key); } /** * Use {@link #getAttrMap()} instead. */ @java.lang.Deprecated public java.util.Map getAttr() { return getAttrMap(); } /** *
     * Operation-specific graph-construction-time configuration.
     * Note that this should include all attrs defined in the
     * corresponding OpDef, including those with a value matching
     * the default -- this allows the default to change and makes
     * NodeDefs easier to interpret on their own.  However, if
     * an attr with a default is not specified in this list, the
     * default will be used.
     * The "names" (keys) must match the regexp "[a-z][a-z0-9_]+" (and
     * one of the names from the corresponding OpDef's attr field).
     * The values must have a type matching the corresponding OpDef
     * attr's type field.
     * TODO(josh11b): Add some examples here showing best practices.
     * 
* * map<string, .tensorflow.AttrValue> attr = 5; */ public java.util.Map getAttrMap() { return internalGetAttr().getMap(); } /** *
     * Operation-specific graph-construction-time configuration.
     * Note that this should include all attrs defined in the
     * corresponding OpDef, including those with a value matching
     * the default -- this allows the default to change and makes
     * NodeDefs easier to interpret on their own.  However, if
     * an attr with a default is not specified in this list, the
     * default will be used.
     * The "names" (keys) must match the regexp "[a-z][a-z0-9_]+" (and
     * one of the names from the corresponding OpDef's attr field).
     * The values must have a type matching the corresponding OpDef
     * attr's type field.
     * TODO(josh11b): Add some examples here showing best practices.
     * 
* * map<string, .tensorflow.AttrValue> attr = 5; */ public org.tensorflow.framework.AttrValue getAttrOrDefault( java.lang.String key, org.tensorflow.framework.AttrValue defaultValue) { if (key == null) { throw new java.lang.NullPointerException(); } java.util.Map map = internalGetAttr().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** *
     * Operation-specific graph-construction-time configuration.
     * Note that this should include all attrs defined in the
     * corresponding OpDef, including those with a value matching
     * the default -- this allows the default to change and makes
     * NodeDefs easier to interpret on their own.  However, if
     * an attr with a default is not specified in this list, the
     * default will be used.
     * The "names" (keys) must match the regexp "[a-z][a-z0-9_]+" (and
     * one of the names from the corresponding OpDef's attr field).
     * The values must have a type matching the corresponding OpDef
     * attr's type field.
     * TODO(josh11b): Add some examples here showing best practices.
     * 
* * map<string, .tensorflow.AttrValue> attr = 5; */ public org.tensorflow.framework.AttrValue getAttrOrThrow( java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); } java.util.Map map = internalGetAttr().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } public Builder clearAttr() { internalGetMutableAttr().getMutableMap() .clear(); return this; } /** *
     * Operation-specific graph-construction-time configuration.
     * Note that this should include all attrs defined in the
     * corresponding OpDef, including those with a value matching
     * the default -- this allows the default to change and makes
     * NodeDefs easier to interpret on their own.  However, if
     * an attr with a default is not specified in this list, the
     * default will be used.
     * The "names" (keys) must match the regexp "[a-z][a-z0-9_]+" (and
     * one of the names from the corresponding OpDef's attr field).
     * The values must have a type matching the corresponding OpDef
     * attr's type field.
     * TODO(josh11b): Add some examples here showing best practices.
     * 
* * map<string, .tensorflow.AttrValue> attr = 5; */ public Builder removeAttr( java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); } internalGetMutableAttr().getMutableMap() .remove(key); return this; } /** * Use alternate mutation accessors instead. */ @java.lang.Deprecated public java.util.Map getMutableAttr() { return internalGetMutableAttr().getMutableMap(); } /** *
     * Operation-specific graph-construction-time configuration.
     * Note that this should include all attrs defined in the
     * corresponding OpDef, including those with a value matching
     * the default -- this allows the default to change and makes
     * NodeDefs easier to interpret on their own.  However, if
     * an attr with a default is not specified in this list, the
     * default will be used.
     * The "names" (keys) must match the regexp "[a-z][a-z0-9_]+" (and
     * one of the names from the corresponding OpDef's attr field).
     * The values must have a type matching the corresponding OpDef
     * attr's type field.
     * TODO(josh11b): Add some examples here showing best practices.
     * 
* * map<string, .tensorflow.AttrValue> attr = 5; */ public Builder putAttr( java.lang.String key, org.tensorflow.framework.AttrValue value) { if (key == null) { throw new java.lang.NullPointerException(); } if (value == null) { throw new java.lang.NullPointerException(); } internalGetMutableAttr().getMutableMap() .put(key, value); return this; } /** *
     * Operation-specific graph-construction-time configuration.
     * Note that this should include all attrs defined in the
     * corresponding OpDef, including those with a value matching
     * the default -- this allows the default to change and makes
     * NodeDefs easier to interpret on their own.  However, if
     * an attr with a default is not specified in this list, the
     * default will be used.
     * The "names" (keys) must match the regexp "[a-z][a-z0-9_]+" (and
     * one of the names from the corresponding OpDef's attr field).
     * The values must have a type matching the corresponding OpDef
     * attr's type field.
     * TODO(josh11b): Add some examples here showing best practices.
     * 
* * map<string, .tensorflow.AttrValue> attr = 5; */ public Builder putAllAttr( java.util.Map values) { internalGetMutableAttr().getMutableMap() .putAll(values); 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.NodeDef) } // @@protoc_insertion_point(class_scope:tensorflow.NodeDef) private static final org.tensorflow.framework.NodeDef DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new org.tensorflow.framework.NodeDef(); } public static org.tensorflow.framework.NodeDef getDefaultInstance() { return DEFAULT_INSTANCE; } private static final org.nd4j.shade.protobuf.Parser PARSER = new org.nd4j.shade.protobuf.AbstractParser() { @java.lang.Override public NodeDef parsePartialFrom( org.nd4j.shade.protobuf.CodedInputStream input, org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry) throws org.nd4j.shade.protobuf.InvalidProtocolBufferException { return new NodeDef(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.NodeDef getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy