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 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);
 }