Exemple #1
0
        /// <summary>
        /// Marks this tensor to be watched by the given tape.
        /// </summary>
        /// <param name="x"></param>
        public void Watch(long tensor_id)
        {
            if (!CouldBackprop())
            {
                return;
            }

            tensor_tape_.emplace(tensor_id, -1);
        }
Exemple #2
0
        /// <summary>
        /// Marks this tensor to be watched by the given tape.
        /// </summary>
        /// <param name="x"></param>
        public void Watch(long tensor_id)
        {
            if (!CouldBackprop())
            {
                return;
            }

            tf.Logger.Debug($"Watch tensor_id={tensor_id}");
            tensor_tape_.emplace(tensor_id, -1);
        }
Exemple #3
0
 /// <summary>
 /// Marks this tensor to be watched by the given tape.
 /// </summary>
 /// <param name="x"></param>
 public void Watch(Tensor x)
 {
     tf.Logger.Debug($"Watch tensor id={x.Id}, name={x.name}");
     tensor_tape_.emplace(x, -1);
 }