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.15.0
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
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:tensorflow.NodeDef)
    NodeDefOrBuilder {
private static final long serialVersionUID = 0L;
  // Use NodeDef.newBuilder() to construct.
  private NodeDef(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    super(builder);
  }
  private NodeDef() {
    name_ = "";
    op_ = "";
    input_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    device_ = "";
  }

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return this.unknownFields;
  }
  private NodeDef(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    this();
    if (extensionRegistry == null) {
      throw new java.lang.NullPointerException();
    }
    int mutable_bitField0_ = 0;
    com.google.protobuf.UnknownFieldSet.Builder unknownFields =
        com.google.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 18: {
            java.lang.String s = input.readStringRequireUtf8();

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

            device_ = s;
            break;
          }
          case 42: {
            if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
              attr_ = com.google.protobuf.MapField.newMapField(
                  AttrDefaultEntryHolder.defaultEntry);
              mutable_bitField0_ |= 0x00000010;
            }
            com.google.protobuf.MapEntry
            attr__ = input.readMessage(
                AttrDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
            attr_.getMutableMap().put(
                attr__.getKey(), attr__.getValue());
            break;
          }
          case 50: {
            org.tensorflow.framework.NodeDef.ExperimentalDebugInfo.Builder subBuilder = null;
            if (experimentalDebugInfo_ != null) {
              subBuilder = experimentalDebugInfo_.toBuilder();
            }
            experimentalDebugInfo_ = input.readMessage(org.tensorflow.framework.NodeDef.ExperimentalDebugInfo.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(experimentalDebugInfo_);
              experimentalDebugInfo_ = subBuilder.buildPartial();
            }

            break;
          }
        }
      }
    } catch (com.google.protobuf.InvalidProtocolBufferException e) {
      throw e.setUnfinishedMessage(this);
    } catch (java.io.IOException e) {
      throw new com.google.protobuf.InvalidProtocolBufferException(
          e).setUnfinishedMessage(this);
    } finally {
      if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
        input_ = input_.getUnmodifiableView();
      }
      this.unknownFields = unknownFields.build();
      makeExtensionsImmutable();
    }
  }
  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return org.tensorflow.framework.NodeProto.internal_static_tensorflow_NodeDef_descriptor;
  }

  @SuppressWarnings({"rawtypes"})
  protected com.google.protobuf.MapField internalGetMapField(
      int number) {
    switch (number) {
      case 5:
        return internalGetAttr();
      default:
        throw new RuntimeException(
            "Invalid map field number: " + number);
    }
  }
  protected com.google.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 interface ExperimentalDebugInfoOrBuilder extends
      // @@protoc_insertion_point(interface_extends:tensorflow.NodeDef.ExperimentalDebugInfo)
      com.google.protobuf.MessageOrBuilder {

    /**
     * 
     * Opaque string inserted into error messages created by the runtime.
     * This is intended to store the list of names of the nodes from the
     * original graph that this node was derived. For example if this node, say
     * C, was result of a fusion of 2 nodes A and B, then 'original_node' would
     * be {A, B}. This information can be used to map errors originating at the
     * current node to some top level source code.
     * 
* * repeated string original_node_names = 1; */ java.util.List getOriginalNodeNamesList(); /** *
     * Opaque string inserted into error messages created by the runtime.
     * This is intended to store the list of names of the nodes from the
     * original graph that this node was derived. For example if this node, say
     * C, was result of a fusion of 2 nodes A and B, then 'original_node' would
     * be {A, B}. This information can be used to map errors originating at the
     * current node to some top level source code.
     * 
* * repeated string original_node_names = 1; */ int getOriginalNodeNamesCount(); /** *
     * Opaque string inserted into error messages created by the runtime.
     * This is intended to store the list of names of the nodes from the
     * original graph that this node was derived. For example if this node, say
     * C, was result of a fusion of 2 nodes A and B, then 'original_node' would
     * be {A, B}. This information can be used to map errors originating at the
     * current node to some top level source code.
     * 
* * repeated string original_node_names = 1; */ java.lang.String getOriginalNodeNames(int index); /** *
     * Opaque string inserted into error messages created by the runtime.
     * This is intended to store the list of names of the nodes from the
     * original graph that this node was derived. For example if this node, say
     * C, was result of a fusion of 2 nodes A and B, then 'original_node' would
     * be {A, B}. This information can be used to map errors originating at the
     * current node to some top level source code.
     * 
* * repeated string original_node_names = 1; */ com.google.protobuf.ByteString getOriginalNodeNamesBytes(int index); } /** * Protobuf type {@code tensorflow.NodeDef.ExperimentalDebugInfo} */ public static final class ExperimentalDebugInfo extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:tensorflow.NodeDef.ExperimentalDebugInfo) ExperimentalDebugInfoOrBuilder { private static final long serialVersionUID = 0L; // Use ExperimentalDebugInfo.newBuilder() to construct. private ExperimentalDebugInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private ExperimentalDebugInfo() { originalNodeNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private ExperimentalDebugInfo( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.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)) { originalNodeNames_ = new com.google.protobuf.LazyStringArrayList(); mutable_bitField0_ |= 0x00000001; } originalNodeNames_.add(s); break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { originalNodeNames_ = originalNodeNames_.getUnmodifiableView(); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.framework.NodeProto.internal_static_tensorflow_NodeDef_ExperimentalDebugInfo_descriptor; } protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.framework.NodeProto.internal_static_tensorflow_NodeDef_ExperimentalDebugInfo_fieldAccessorTable .ensureFieldAccessorsInitialized( org.tensorflow.framework.NodeDef.ExperimentalDebugInfo.class, org.tensorflow.framework.NodeDef.ExperimentalDebugInfo.Builder.class); } public static final int ORIGINAL_NODE_NAMES_FIELD_NUMBER = 1; private com.google.protobuf.LazyStringList originalNodeNames_; /** *
     * Opaque string inserted into error messages created by the runtime.
     * This is intended to store the list of names of the nodes from the
     * original graph that this node was derived. For example if this node, say
     * C, was result of a fusion of 2 nodes A and B, then 'original_node' would
     * be {A, B}. This information can be used to map errors originating at the
     * current node to some top level source code.
     * 
* * repeated string original_node_names = 1; */ public com.google.protobuf.ProtocolStringList getOriginalNodeNamesList() { return originalNodeNames_; } /** *
     * Opaque string inserted into error messages created by the runtime.
     * This is intended to store the list of names of the nodes from the
     * original graph that this node was derived. For example if this node, say
     * C, was result of a fusion of 2 nodes A and B, then 'original_node' would
     * be {A, B}. This information can be used to map errors originating at the
     * current node to some top level source code.
     * 
* * repeated string original_node_names = 1; */ public int getOriginalNodeNamesCount() { return originalNodeNames_.size(); } /** *
     * Opaque string inserted into error messages created by the runtime.
     * This is intended to store the list of names of the nodes from the
     * original graph that this node was derived. For example if this node, say
     * C, was result of a fusion of 2 nodes A and B, then 'original_node' would
     * be {A, B}. This information can be used to map errors originating at the
     * current node to some top level source code.
     * 
* * repeated string original_node_names = 1; */ public java.lang.String getOriginalNodeNames(int index) { return originalNodeNames_.get(index); } /** *
     * Opaque string inserted into error messages created by the runtime.
     * This is intended to store the list of names of the nodes from the
     * original graph that this node was derived. For example if this node, say
     * C, was result of a fusion of 2 nodes A and B, then 'original_node' would
     * be {A, B}. This information can be used to map errors originating at the
     * current node to some top level source code.
     * 
* * repeated string original_node_names = 1; */ public com.google.protobuf.ByteString getOriginalNodeNamesBytes(int index) { return originalNodeNames_.getByteString(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(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { for (int i = 0; i < originalNodeNames_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, originalNodeNames_.getRaw(i)); } unknownFields.writeTo(output); } public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; { int dataSize = 0; for (int i = 0; i < originalNodeNames_.size(); i++) { dataSize += computeStringSizeNoTag(originalNodeNames_.getRaw(i)); } size += dataSize; size += 1 * getOriginalNodeNamesList().size(); } 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.ExperimentalDebugInfo)) { return super.equals(obj); } org.tensorflow.framework.NodeDef.ExperimentalDebugInfo other = (org.tensorflow.framework.NodeDef.ExperimentalDebugInfo) obj; boolean result = true; result = result && getOriginalNodeNamesList() .equals(other.getOriginalNodeNamesList()); 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 (getOriginalNodeNamesCount() > 0) { hash = (37 * hash) + ORIGINAL_NODE_NAMES_FIELD_NUMBER; hash = (53 * hash) + getOriginalNodeNamesList().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static org.tensorflow.framework.NodeDef.ExperimentalDebugInfo parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.tensorflow.framework.NodeDef.ExperimentalDebugInfo parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.tensorflow.framework.NodeDef.ExperimentalDebugInfo parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.tensorflow.framework.NodeDef.ExperimentalDebugInfo parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.tensorflow.framework.NodeDef.ExperimentalDebugInfo parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.tensorflow.framework.NodeDef.ExperimentalDebugInfo parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.tensorflow.framework.NodeDef.ExperimentalDebugInfo parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static org.tensorflow.framework.NodeDef.ExperimentalDebugInfo parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static org.tensorflow.framework.NodeDef.ExperimentalDebugInfo parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static org.tensorflow.framework.NodeDef.ExperimentalDebugInfo parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static org.tensorflow.framework.NodeDef.ExperimentalDebugInfo parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static org.tensorflow.framework.NodeDef.ExperimentalDebugInfo parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(org.tensorflow.framework.NodeDef.ExperimentalDebugInfo 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( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * Protobuf type {@code tensorflow.NodeDef.ExperimentalDebugInfo} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:tensorflow.NodeDef.ExperimentalDebugInfo) org.tensorflow.framework.NodeDef.ExperimentalDebugInfoOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.framework.NodeProto.internal_static_tensorflow_NodeDef_ExperimentalDebugInfo_descriptor; } protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.framework.NodeProto.internal_static_tensorflow_NodeDef_ExperimentalDebugInfo_fieldAccessorTable .ensureFieldAccessorsInitialized( org.tensorflow.framework.NodeDef.ExperimentalDebugInfo.class, org.tensorflow.framework.NodeDef.ExperimentalDebugInfo.Builder.class); } // Construct using org.tensorflow.framework.NodeDef.ExperimentalDebugInfo.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } public Builder clear() { super.clear(); originalNodeNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000001); return this; } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.tensorflow.framework.NodeProto.internal_static_tensorflow_NodeDef_ExperimentalDebugInfo_descriptor; } public org.tensorflow.framework.NodeDef.ExperimentalDebugInfo getDefaultInstanceForType() { return org.tensorflow.framework.NodeDef.ExperimentalDebugInfo.getDefaultInstance(); } public org.tensorflow.framework.NodeDef.ExperimentalDebugInfo build() { org.tensorflow.framework.NodeDef.ExperimentalDebugInfo result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public org.tensorflow.framework.NodeDef.ExperimentalDebugInfo buildPartial() { org.tensorflow.framework.NodeDef.ExperimentalDebugInfo result = new org.tensorflow.framework.NodeDef.ExperimentalDebugInfo(this); int from_bitField0_ = bitField0_; if (((bitField0_ & 0x00000001) == 0x00000001)) { originalNodeNames_ = originalNodeNames_.getUnmodifiableView(); bitField0_ = (bitField0_ & ~0x00000001); } result.originalNodeNames_ = originalNodeNames_; onBuilt(); return result; } public Builder clone() { return (Builder) super.clone(); } public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.setField(field, value); } public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.tensorflow.framework.NodeDef.ExperimentalDebugInfo) { return mergeFrom((org.tensorflow.framework.NodeDef.ExperimentalDebugInfo)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(org.tensorflow.framework.NodeDef.ExperimentalDebugInfo other) { if (other == org.tensorflow.framework.NodeDef.ExperimentalDebugInfo.getDefaultInstance()) return this; if (!other.originalNodeNames_.isEmpty()) { if (originalNodeNames_.isEmpty()) { originalNodeNames_ = other.originalNodeNames_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureOriginalNodeNamesIsMutable(); originalNodeNames_.addAll(other.originalNodeNames_); } onChanged(); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { org.tensorflow.framework.NodeDef.ExperimentalDebugInfo parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (org.tensorflow.framework.NodeDef.ExperimentalDebugInfo) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private com.google.protobuf.LazyStringList originalNodeNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; private void ensureOriginalNodeNamesIsMutable() { if (!((bitField0_ & 0x00000001) == 0x00000001)) { originalNodeNames_ = new com.google.protobuf.LazyStringArrayList(originalNodeNames_); bitField0_ |= 0x00000001; } } /** *
       * Opaque string inserted into error messages created by the runtime.
       * This is intended to store the list of names of the nodes from the
       * original graph that this node was derived. For example if this node, say
       * C, was result of a fusion of 2 nodes A and B, then 'original_node' would
       * be {A, B}. This information can be used to map errors originating at the
       * current node to some top level source code.
       * 
* * repeated string original_node_names = 1; */ public com.google.protobuf.ProtocolStringList getOriginalNodeNamesList() { return originalNodeNames_.getUnmodifiableView(); } /** *
       * Opaque string inserted into error messages created by the runtime.
       * This is intended to store the list of names of the nodes from the
       * original graph that this node was derived. For example if this node, say
       * C, was result of a fusion of 2 nodes A and B, then 'original_node' would
       * be {A, B}. This information can be used to map errors originating at the
       * current node to some top level source code.
       * 
* * repeated string original_node_names = 1; */ public int getOriginalNodeNamesCount() { return originalNodeNames_.size(); } /** *
       * Opaque string inserted into error messages created by the runtime.
       * This is intended to store the list of names of the nodes from the
       * original graph that this node was derived. For example if this node, say
       * C, was result of a fusion of 2 nodes A and B, then 'original_node' would
       * be {A, B}. This information can be used to map errors originating at the
       * current node to some top level source code.
       * 
* * repeated string original_node_names = 1; */ public java.lang.String getOriginalNodeNames(int index) { return originalNodeNames_.get(index); } /** *
       * Opaque string inserted into error messages created by the runtime.
       * This is intended to store the list of names of the nodes from the
       * original graph that this node was derived. For example if this node, say
       * C, was result of a fusion of 2 nodes A and B, then 'original_node' would
       * be {A, B}. This information can be used to map errors originating at the
       * current node to some top level source code.
       * 
* * repeated string original_node_names = 1; */ public com.google.protobuf.ByteString getOriginalNodeNamesBytes(int index) { return originalNodeNames_.getByteString(index); } /** *
       * Opaque string inserted into error messages created by the runtime.
       * This is intended to store the list of names of the nodes from the
       * original graph that this node was derived. For example if this node, say
       * C, was result of a fusion of 2 nodes A and B, then 'original_node' would
       * be {A, B}. This information can be used to map errors originating at the
       * current node to some top level source code.
       * 
* * repeated string original_node_names = 1; */ public Builder setOriginalNodeNames( int index, java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureOriginalNodeNamesIsMutable(); originalNodeNames_.set(index, value); onChanged(); return this; } /** *
       * Opaque string inserted into error messages created by the runtime.
       * This is intended to store the list of names of the nodes from the
       * original graph that this node was derived. For example if this node, say
       * C, was result of a fusion of 2 nodes A and B, then 'original_node' would
       * be {A, B}. This information can be used to map errors originating at the
       * current node to some top level source code.
       * 
* * repeated string original_node_names = 1; */ public Builder addOriginalNodeNames( java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureOriginalNodeNamesIsMutable(); originalNodeNames_.add(value); onChanged(); return this; } /** *
       * Opaque string inserted into error messages created by the runtime.
       * This is intended to store the list of names of the nodes from the
       * original graph that this node was derived. For example if this node, say
       * C, was result of a fusion of 2 nodes A and B, then 'original_node' would
       * be {A, B}. This information can be used to map errors originating at the
       * current node to some top level source code.
       * 
* * repeated string original_node_names = 1; */ public Builder addAllOriginalNodeNames( java.lang.Iterable values) { ensureOriginalNodeNamesIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, originalNodeNames_); onChanged(); return this; } /** *
       * Opaque string inserted into error messages created by the runtime.
       * This is intended to store the list of names of the nodes from the
       * original graph that this node was derived. For example if this node, say
       * C, was result of a fusion of 2 nodes A and B, then 'original_node' would
       * be {A, B}. This information can be used to map errors originating at the
       * current node to some top level source code.
       * 
* * repeated string original_node_names = 1; */ public Builder clearOriginalNodeNames() { originalNodeNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** *
       * Opaque string inserted into error messages created by the runtime.
       * This is intended to store the list of names of the nodes from the
       * original graph that this node was derived. For example if this node, say
       * C, was result of a fusion of 2 nodes A and B, then 'original_node' would
       * be {A, B}. This information can be used to map errors originating at the
       * current node to some top level source code.
       * 
* * repeated string original_node_names = 1; */ public Builder addOriginalNodeNamesBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); ensureOriginalNodeNamesIsMutable(); originalNodeNames_.add(value); onChanged(); return this; } public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFieldsProto3(unknownFields); } public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:tensorflow.NodeDef.ExperimentalDebugInfo) } // @@protoc_insertion_point(class_scope:tensorflow.NodeDef.ExperimentalDebugInfo) private static final org.tensorflow.framework.NodeDef.ExperimentalDebugInfo DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new org.tensorflow.framework.NodeDef.ExperimentalDebugInfo(); } public static org.tensorflow.framework.NodeDef.ExperimentalDebugInfo getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { public ExperimentalDebugInfo parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new ExperimentalDebugInfo(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } public org.tensorflow.framework.NodeDef.ExperimentalDebugInfo getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } private int bitField0_; 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 { com.google.protobuf.ByteString bs = (com.google.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 com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); name_ = b; return b; } else { return (com.google.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 { com.google.protobuf.ByteString bs = (com.google.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 com.google.protobuf.ByteString getOpBytes() { java.lang.Object ref = op_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); op_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int INPUT_FIELD_NUMBER = 3; private com.google.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 com.google.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 com.google.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 { com.google.protobuf.ByteString bs = (com.google.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 com.google.protobuf.ByteString getDeviceBytes() { java.lang.Object ref = device_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); device_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int ATTR_FIELD_NUMBER = 5; private static final class AttrDefaultEntryHolder { static final com.google.protobuf.MapEntry< java.lang.String, org.tensorflow.framework.AttrValue> defaultEntry = com.google.protobuf.MapEntry .newDefaultInstance( org.tensorflow.framework.NodeProto.internal_static_tensorflow_NodeDef_AttrEntry_descriptor, com.google.protobuf.WireFormat.FieldType.STRING, "", com.google.protobuf.WireFormat.FieldType.MESSAGE, org.tensorflow.framework.AttrValue.getDefaultInstance()); } private com.google.protobuf.MapField< java.lang.String, org.tensorflow.framework.AttrValue> attr_; private com.google.protobuf.MapField internalGetAttr() { if (attr_ == null) { return com.google.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); } public static final int EXPERIMENTAL_DEBUG_INFO_FIELD_NUMBER = 6; private org.tensorflow.framework.NodeDef.ExperimentalDebugInfo experimentalDebugInfo_; /** *
   * This stores debug information associated with the node.
   * 
* * .tensorflow.NodeDef.ExperimentalDebugInfo experimental_debug_info = 6; */ public boolean hasExperimentalDebugInfo() { return experimentalDebugInfo_ != null; } /** *
   * This stores debug information associated with the node.
   * 
* * .tensorflow.NodeDef.ExperimentalDebugInfo experimental_debug_info = 6; */ public org.tensorflow.framework.NodeDef.ExperimentalDebugInfo getExperimentalDebugInfo() { return experimentalDebugInfo_ == null ? org.tensorflow.framework.NodeDef.ExperimentalDebugInfo.getDefaultInstance() : experimentalDebugInfo_; } /** *
   * This stores debug information associated with the node.
   * 
* * .tensorflow.NodeDef.ExperimentalDebugInfo experimental_debug_info = 6; */ public org.tensorflow.framework.NodeDef.ExperimentalDebugInfoOrBuilder getExperimentalDebugInfoOrBuilder() { return getExperimentalDebugInfo(); } 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(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } if (!getOpBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, op_); } for (int i = 0; i < input_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, input_.getRaw(i)); } if (!getDeviceBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, device_); } com.google.protobuf.GeneratedMessageV3 .serializeStringMapTo( output, internalGetAttr(), AttrDefaultEntryHolder.defaultEntry, 5); if (experimentalDebugInfo_ != null) { output.writeMessage(6, getExperimentalDebugInfo()); } unknownFields.writeTo(output); } public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getNameBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } if (!getOpBytes().isEmpty()) { size += com.google.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 += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, device_); } for (java.util.Map.Entry entry : internalGetAttr().getMap().entrySet()) { com.google.protobuf.MapEntry attr__ = AttrDefaultEntryHolder.defaultEntry.newBuilderForType() .setKey(entry.getKey()) .setValue(entry.getValue()) .build(); size += com.google.protobuf.CodedOutputStream .computeMessageSize(5, attr__); } if (experimentalDebugInfo_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(6, getExperimentalDebugInfo()); } 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; boolean result = true; result = result && getName() .equals(other.getName()); result = result && getOp() .equals(other.getOp()); result = result && getInputList() .equals(other.getInputList()); result = result && getDevice() .equals(other.getDevice()); result = result && internalGetAttr().equals( other.internalGetAttr()); result = result && (hasExperimentalDebugInfo() == other.hasExperimentalDebugInfo()); if (hasExperimentalDebugInfo()) { result = result && getExperimentalDebugInfo() .equals(other.getExperimentalDebugInfo()); } 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) + 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(); } if (hasExperimentalDebugInfo()) { hash = (37 * hash) + EXPERIMENTAL_DEBUG_INFO_FIELD_NUMBER; hash = (53 * hash) + getExperimentalDebugInfo().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static org.tensorflow.framework.NodeDef parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.tensorflow.framework.NodeDef parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.tensorflow.framework.NodeDef parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.tensorflow.framework.NodeDef parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.tensorflow.framework.NodeDef parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.tensorflow.framework.NodeDef parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.tensorflow.framework.NodeDef parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static org.tensorflow.framework.NodeDef parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static org.tensorflow.framework.NodeDef parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static org.tensorflow.framework.NodeDef parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static org.tensorflow.framework.NodeDef parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static org.tensorflow.framework.NodeDef parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } 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); } public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * Protobuf type {@code tensorflow.NodeDef} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:tensorflow.NodeDef) org.tensorflow.framework.NodeDefOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.framework.NodeProto.internal_static_tensorflow_NodeDef_descriptor; } @SuppressWarnings({"rawtypes"}) protected com.google.protobuf.MapField internalGetMapField( int number) { switch (number) { case 5: return internalGetAttr(); default: throw new RuntimeException( "Invalid map field number: " + number); } } @SuppressWarnings({"rawtypes"}) protected com.google.protobuf.MapField internalGetMutableMapField( int number) { switch (number) { case 5: return internalGetMutableAttr(); default: throw new RuntimeException( "Invalid map field number: " + number); } } protected com.google.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( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } public Builder clear() { super.clear(); name_ = ""; op_ = ""; input_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000004); device_ = ""; internalGetMutableAttr().clear(); if (experimentalDebugInfoBuilder_ == null) { experimentalDebugInfo_ = null; } else { experimentalDebugInfo_ = null; experimentalDebugInfoBuilder_ = null; } return this; } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.tensorflow.framework.NodeProto.internal_static_tensorflow_NodeDef_descriptor; } public org.tensorflow.framework.NodeDef getDefaultInstanceForType() { return org.tensorflow.framework.NodeDef.getDefaultInstance(); } public org.tensorflow.framework.NodeDef build() { org.tensorflow.framework.NodeDef result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public org.tensorflow.framework.NodeDef buildPartial() { org.tensorflow.framework.NodeDef result = new org.tensorflow.framework.NodeDef(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; result.name_ = name_; result.op_ = op_; if (((bitField0_ & 0x00000004) == 0x00000004)) { input_ = input_.getUnmodifiableView(); bitField0_ = (bitField0_ & ~0x00000004); } result.input_ = input_; result.device_ = device_; result.attr_ = internalGetAttr(); result.attr_.makeImmutable(); if (experimentalDebugInfoBuilder_ == null) { result.experimentalDebugInfo_ = experimentalDebugInfo_; } else { result.experimentalDebugInfo_ = experimentalDebugInfoBuilder_.build(); } result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder clone() { return (Builder) super.clone(); } public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.setField(field, value); } public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } public Builder mergeFrom(com.google.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_ & ~0x00000004); } else { ensureInputIsMutable(); input_.addAll(other.input_); } onChanged(); } if (!other.getDevice().isEmpty()) { device_ = other.device_; onChanged(); } internalGetMutableAttr().mergeFrom( other.internalGetAttr()); if (other.hasExperimentalDebugInfo()) { mergeExperimentalDebugInfo(other.getExperimentalDebugInfo()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { org.tensorflow.framework.NodeDef parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.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)) { com.google.protobuf.ByteString bs = (com.google.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 com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); name_ = b; return b; } else { return (com.google.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( com.google.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)) { com.google.protobuf.ByteString bs = (com.google.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 com.google.protobuf.ByteString getOpBytes() { java.lang.Object ref = op_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); op_ = b; return b; } else { return (com.google.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( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); op_ = value; onChanged(); return this; } private com.google.protobuf.LazyStringList input_ = com.google.protobuf.LazyStringArrayList.EMPTY; private void ensureInputIsMutable() { if (!((bitField0_ & 0x00000004) == 0x00000004)) { input_ = new com.google.protobuf.LazyStringArrayList(input_); bitField0_ |= 0x00000004; } } /** *
     * 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 com.google.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 com.google.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(); com.google.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_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000004); 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( com.google.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)) { com.google.protobuf.ByteString bs = (com.google.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 com.google.protobuf.ByteString getDeviceBytes() { java.lang.Object ref = device_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); device_ = b; return b; } else { return (com.google.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( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); device_ = value; onChanged(); return this; } private com.google.protobuf.MapField< java.lang.String, org.tensorflow.framework.AttrValue> attr_; private com.google.protobuf.MapField internalGetAttr() { if (attr_ == null) { return com.google.protobuf.MapField.emptyMapField( AttrDefaultEntryHolder.defaultEntry); } return attr_; } private com.google.protobuf.MapField internalGetMutableAttr() { onChanged();; if (attr_ == null) { attr_ = com.google.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; } private org.tensorflow.framework.NodeDef.ExperimentalDebugInfo experimentalDebugInfo_ = null; private com.google.protobuf.SingleFieldBuilderV3< org.tensorflow.framework.NodeDef.ExperimentalDebugInfo, org.tensorflow.framework.NodeDef.ExperimentalDebugInfo.Builder, org.tensorflow.framework.NodeDef.ExperimentalDebugInfoOrBuilder> experimentalDebugInfoBuilder_; /** *
     * This stores debug information associated with the node.
     * 
* * .tensorflow.NodeDef.ExperimentalDebugInfo experimental_debug_info = 6; */ public boolean hasExperimentalDebugInfo() { return experimentalDebugInfoBuilder_ != null || experimentalDebugInfo_ != null; } /** *
     * This stores debug information associated with the node.
     * 
* * .tensorflow.NodeDef.ExperimentalDebugInfo experimental_debug_info = 6; */ public org.tensorflow.framework.NodeDef.ExperimentalDebugInfo getExperimentalDebugInfo() { if (experimentalDebugInfoBuilder_ == null) { return experimentalDebugInfo_ == null ? org.tensorflow.framework.NodeDef.ExperimentalDebugInfo.getDefaultInstance() : experimentalDebugInfo_; } else { return experimentalDebugInfoBuilder_.getMessage(); } } /** *
     * This stores debug information associated with the node.
     * 
* * .tensorflow.NodeDef.ExperimentalDebugInfo experimental_debug_info = 6; */ public Builder setExperimentalDebugInfo(org.tensorflow.framework.NodeDef.ExperimentalDebugInfo value) { if (experimentalDebugInfoBuilder_ == null) { if (value == null) { throw new NullPointerException(); } experimentalDebugInfo_ = value; onChanged(); } else { experimentalDebugInfoBuilder_.setMessage(value); } return this; } /** *
     * This stores debug information associated with the node.
     * 
* * .tensorflow.NodeDef.ExperimentalDebugInfo experimental_debug_info = 6; */ public Builder setExperimentalDebugInfo( org.tensorflow.framework.NodeDef.ExperimentalDebugInfo.Builder builderForValue) { if (experimentalDebugInfoBuilder_ == null) { experimentalDebugInfo_ = builderForValue.build(); onChanged(); } else { experimentalDebugInfoBuilder_.setMessage(builderForValue.build()); } return this; } /** *
     * This stores debug information associated with the node.
     * 
* * .tensorflow.NodeDef.ExperimentalDebugInfo experimental_debug_info = 6; */ public Builder mergeExperimentalDebugInfo(org.tensorflow.framework.NodeDef.ExperimentalDebugInfo value) { if (experimentalDebugInfoBuilder_ == null) { if (experimentalDebugInfo_ != null) { experimentalDebugInfo_ = org.tensorflow.framework.NodeDef.ExperimentalDebugInfo.newBuilder(experimentalDebugInfo_).mergeFrom(value).buildPartial(); } else { experimentalDebugInfo_ = value; } onChanged(); } else { experimentalDebugInfoBuilder_.mergeFrom(value); } return this; } /** *
     * This stores debug information associated with the node.
     * 
* * .tensorflow.NodeDef.ExperimentalDebugInfo experimental_debug_info = 6; */ public Builder clearExperimentalDebugInfo() { if (experimentalDebugInfoBuilder_ == null) { experimentalDebugInfo_ = null; onChanged(); } else { experimentalDebugInfo_ = null; experimentalDebugInfoBuilder_ = null; } return this; } /** *
     * This stores debug information associated with the node.
     * 
* * .tensorflow.NodeDef.ExperimentalDebugInfo experimental_debug_info = 6; */ public org.tensorflow.framework.NodeDef.ExperimentalDebugInfo.Builder getExperimentalDebugInfoBuilder() { onChanged(); return getExperimentalDebugInfoFieldBuilder().getBuilder(); } /** *
     * This stores debug information associated with the node.
     * 
* * .tensorflow.NodeDef.ExperimentalDebugInfo experimental_debug_info = 6; */ public org.tensorflow.framework.NodeDef.ExperimentalDebugInfoOrBuilder getExperimentalDebugInfoOrBuilder() { if (experimentalDebugInfoBuilder_ != null) { return experimentalDebugInfoBuilder_.getMessageOrBuilder(); } else { return experimentalDebugInfo_ == null ? org.tensorflow.framework.NodeDef.ExperimentalDebugInfo.getDefaultInstance() : experimentalDebugInfo_; } } /** *
     * This stores debug information associated with the node.
     * 
* * .tensorflow.NodeDef.ExperimentalDebugInfo experimental_debug_info = 6; */ private com.google.protobuf.SingleFieldBuilderV3< org.tensorflow.framework.NodeDef.ExperimentalDebugInfo, org.tensorflow.framework.NodeDef.ExperimentalDebugInfo.Builder, org.tensorflow.framework.NodeDef.ExperimentalDebugInfoOrBuilder> getExperimentalDebugInfoFieldBuilder() { if (experimentalDebugInfoBuilder_ == null) { experimentalDebugInfoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< org.tensorflow.framework.NodeDef.ExperimentalDebugInfo, org.tensorflow.framework.NodeDef.ExperimentalDebugInfo.Builder, org.tensorflow.framework.NodeDef.ExperimentalDebugInfoOrBuilder>( getExperimentalDebugInfo(), getParentForChildren(), isClean()); experimentalDebugInfo_ = null; } return experimentalDebugInfoBuilder_; } public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFieldsProto3(unknownFields); } public final Builder mergeUnknownFields( final com.google.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 com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { public NodeDef parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new NodeDef(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } public org.tensorflow.framework.NodeDef getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy