Ejemplo n.º 1
0
 public void MergeFrom(VariableDef other)
 {
     if (other == null)
     {
         return;
     }
     if (other.VariableName.Length != 0)
     {
         VariableName = other.VariableName;
     }
     if (other.InitialValueName.Length != 0)
     {
         InitialValueName = other.InitialValueName;
     }
     if (other.InitializerName.Length != 0)
     {
         InitializerName = other.InitializerName;
     }
     if (other.SnapshotName.Length != 0)
     {
         SnapshotName = other.SnapshotName;
     }
     if (other.saveSliceInfoDef_ != null)
     {
         if (saveSliceInfoDef_ == null)
         {
             saveSliceInfoDef_ = new global::Tensorflow.SaveSliceInfoDef();
         }
         SaveSliceInfoDef.MergeFrom(other.SaveSliceInfoDef);
     }
     if (other.IsResource != false)
     {
         IsResource = other.IsResource;
     }
 }
Ejemplo n.º 2
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (VariableName.Length != 0)
            {
                hash ^= VariableName.GetHashCode();
            }
            if (InitialValueName.Length != 0)
            {
                hash ^= InitialValueName.GetHashCode();
            }
            if (InitializerName.Length != 0)
            {
                hash ^= InitializerName.GetHashCode();
            }
            if (SnapshotName.Length != 0)
            {
                hash ^= SnapshotName.GetHashCode();
            }
            if (saveSliceInfoDef_ != null)
            {
                hash ^= SaveSliceInfoDef.GetHashCode();
            }
            if (IsResource != false)
            {
                hash ^= IsResource.GetHashCode();
            }
            return(hash);
        }
Ejemplo n.º 3
0
 public void MergeFrom(VariableDef other)
 {
     if (other == null)
     {
         return;
     }
     if (other.VariableName.Length != 0)
     {
         VariableName = other.VariableName;
     }
     if (other.InitialValueName.Length != 0)
     {
         InitialValueName = other.InitialValueName;
     }
     if (other.InitializerName.Length != 0)
     {
         InitializerName = other.InitializerName;
     }
     if (other.SnapshotName.Length != 0)
     {
         SnapshotName = other.SnapshotName;
     }
     if (other.saveSliceInfoDef_ != null)
     {
         if (saveSliceInfoDef_ == null)
         {
             SaveSliceInfoDef = new global::Tensorflow.SaveSliceInfoDef();
         }
         SaveSliceInfoDef.MergeFrom(other.SaveSliceInfoDef);
     }
     if (other.IsResource != false)
     {
         IsResource = other.IsResource;
     }
     if (other.Trainable != false)
     {
         Trainable = other.Trainable;
     }
     if (other.Synchronization != global::Tensorflow.VariableSynchronization.Auto)
     {
         Synchronization = other.Synchronization;
     }
     if (other.Aggregation != global::Tensorflow.VariableAggregation.None)
     {
         Aggregation = other.Aggregation;
     }
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }
Ejemplo n.º 4
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (VariableName.Length != 0)
            {
                hash ^= VariableName.GetHashCode();
            }
            if (InitialValueName.Length != 0)
            {
                hash ^= InitialValueName.GetHashCode();
            }
            if (InitializerName.Length != 0)
            {
                hash ^= InitializerName.GetHashCode();
            }
            if (SnapshotName.Length != 0)
            {
                hash ^= SnapshotName.GetHashCode();
            }
            if (saveSliceInfoDef_ != null)
            {
                hash ^= SaveSliceInfoDef.GetHashCode();
            }
            if (IsResource != false)
            {
                hash ^= IsResource.GetHashCode();
            }
            if (Trainable != false)
            {
                hash ^= Trainable.GetHashCode();
            }
            if (Synchronization != global::Tensorflow.VariableSynchronization.Auto)
            {
                hash ^= Synchronization.GetHashCode();
            }
            if (Aggregation != global::Tensorflow.VariableAggregation.None)
            {
                hash ^= Aggregation.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }