public Builder mergeFrom(org.tensorflow.framework.TensorShapeProto.Dim other) { if (other == org.tensorflow.framework.TensorShapeProto.Dim.getDefaultInstance()) return this; if (other.getSize() != 0L) { setSize(other.getSize()); } if (!other.getName().isEmpty()) { name_ = other.name_; onChanged(); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + SIZE_FIELD_NUMBER; hash = (53 * hash) + com.github.os72.protobuf351.Internal.hashLong( getSize()); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
break; default: { if (!parseUnknownFieldProto3( input, unknownFields, extensionRegistry, tag)) { done = true; } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable();
break; default: { if (!parseUnknownFieldProto3( input, unknownFields, extensionRegistry, tag)) { done = true; } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable();
/** * <pre> * Dimensions of the tensor, such as {"input", 30}, {"output", 40} * for a 30 x 40 2D tensor. If an entry has size -1, this * corresponds to a dimension of unknown size. The names are * optional. * The order of entries in "dim" matters: It indicates the layout of the * values in the tensor in-memory representation. * The first entry in "dim" is the outermost dimension used to layout the * values, the last entry is the innermost dimension. This matches the * in-memory layout of RowMajor Eigen tensors. * If "dim.size()" > 0, "unknown_rank" must be false. * </pre> * * <code>repeated .tensorflow.TensorShapeProto.Dim dim = 2;</code> */ public org.tensorflow.framework.TensorShapeProto.Dim.Builder addDimBuilder( int index) { return getDimFieldBuilder().addBuilder( index, org.tensorflow.framework.TensorShapeProto.Dim.getDefaultInstance()); } /**
/** * <pre> * Dimensions of the tensor, such as {"input", 30}, {"output", 40} * for a 30 x 40 2D tensor. If an entry has size -1, this * corresponds to a dimension of unknown size. The names are * optional. * The order of entries in "dim" matters: It indicates the layout of the * values in the tensor in-memory representation. * The first entry in "dim" is the outermost dimension used to layout the * values, the last entry is the innermost dimension. This matches the * in-memory layout of RowMajor Eigen tensors. * If "dim.size()" > 0, "unknown_rank" must be false. * </pre> * * <code>repeated .tensorflow.TensorShapeProto.Dim dim = 2;</code> */ public org.tensorflow.framework.TensorShapeProto.Dim.Builder addDimBuilder() { return getDimFieldBuilder().addBuilder( org.tensorflow.framework.TensorShapeProto.Dim.getDefaultInstance()); } /**
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof org.tensorflow.framework.TensorShapeProto.Dim)) { return super.equals(obj); } org.tensorflow.framework.TensorShapeProto.Dim other = (org.tensorflow.framework.TensorShapeProto.Dim) obj; boolean result = true; result = result && (getSize() == other.getSize()); result = result && getName() .equals(other.getName()); 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) + SIZE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getSize()); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (size_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(1, size_); } if (!getNameBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; }
public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() {
public org.tensorflow.framework.TensorShapeProto.Dim getDefaultInstanceForType() { return org.tensorflow.framework.TensorShapeProto.Dim.getDefaultInstance(); }
public org.tensorflow.framework.TensorShapeProto.Dim build() { org.tensorflow.framework.TensorShapeProto.Dim result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; }
/** * <pre> * Optional name of the tensor dimension. * </pre> * * <code>string name = 2;</code> */ public Builder clearName() { name_ = getDefaultInstance().getName(); onChanged(); return this; } /**
public Builder mergeFrom(org.tensorflow.framework.TensorShapeProto.Dim other) { if (other == org.tensorflow.framework.TensorShapeProto.Dim.getDefaultInstance()) return this; if (other.getSize() != 0L) { setSize(other.getSize()); } if (!other.getName().isEmpty()) { name_ = other.name_; onChanged(); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (size_ != 0L) { output.writeInt64(1, size_); } if (!getNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); } unknownFields.writeTo(output); }
public org.tensorflow.framework.TensorShapeProto.Dim buildPartial() { org.tensorflow.framework.TensorShapeProto.Dim result = new org.tensorflow.framework.TensorShapeProto.Dim(this); result.size_ = size_; result.name_ = name_; onBuilt(); return result; }
int dim = (int) tfTensor.getTensorShape().getDim(e).getSize();
int[] dimsToSet = new int[shape.size()]; for(int i = 0; i < dimsToSet.length; i++) { dimsToSet[i] = (int) shape.get(i).getSize();
/** * <pre> * Dimensions of the tensor, such as {"input", 30}, {"output", 40} * for a 30 x 40 2D tensor. If an entry has size -1, this * corresponds to a dimension of unknown size. The names are * optional. * The order of entries in "dim" matters: It indicates the layout of the * values in the tensor in-memory representation. * The first entry in "dim" is the outermost dimension used to layout the * values, the last entry is the innermost dimension. This matches the * in-memory layout of RowMajor Eigen tensors. * If "dim.size()" > 0, "unknown_rank" must be false. * </pre> * * <code>repeated .tensorflow.TensorShapeProto.Dim dim = 2;</code> */ public org.tensorflow.framework.TensorShapeProto.Dim.Builder addDimBuilder() { return getDimFieldBuilder().addBuilder( org.tensorflow.framework.TensorShapeProto.Dim.getDefaultInstance()); } /**