You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

BackpropInitialState.cs 1.0 kB

123456789101112131415161718192021222324252627282930
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. using Tensorflow.Util;
  5. using static Tensorflow.tensorflow;
  6. namespace Tensorflow.Gradients
  7. {
  8. public class BackpropInitialState
  9. {
  10. public OpTape<BackwardFunction, TapeTensor> op_tape { get; set; }
  11. /// <summary>
  12. /// Map from tensor ID to how many references still exist for this tensor in
  13. /// the tape.
  14. /// </summary>
  15. public UnorderedMap<long, long> tensor_usage_counts { get; set; }
  16. /// <summary>
  17. /// Maps from op ID to how many output tensors of this op still need to have
  18. /// their gradients computed.
  19. /// </summary>
  20. public UnorderedMap<long, long> op_missing_tensor { get; set; }
  21. public BackpropInitialState()
  22. {
  23. op_tape = new OpTape<BackwardFunction, TapeTensor>();
  24. tensor_usage_counts = new UnorderedMap<long, long>();
  25. op_missing_tensor = new UnorderedMap<long, long>();
  26. }
  27. }
  28. }