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.

ops.GraphKeys.cs 2.2 kB

6 years ago
6 years ago
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. namespace Tensorflow
  5. {
  6. public partial class ops
  7. {
  8. /// <summary>
  9. /// Standard names to use for graph collections.
  10. /// The standard library uses various well-known names to collect and
  11. /// retrieve values associated with a graph. For example, the
  12. /// `tf.Optimizer` subclasses default to optimizing the variables
  13. /// collected under `tf.GraphKeys.TRAINABLE_VARIABLES` if none is
  14. /// specified, but it is also possible to pass an explicit list of
  15. /// variables.
  16. /// </summary>
  17. public static class GraphKeys
  18. {
  19. /// <summary>
  20. /// the subset of `Variable` objects that will be trained by an optimizer.
  21. /// </summary>
  22. public static string TRAINABLE_VARIABLES = "trainable_variables";
  23. /// <summary>
  24. /// Key to collect losses
  25. /// </summary>
  26. public static string LOSSES = "losses";
  27. /// <summary>
  28. /// Key to collect Variable objects that are global (shared across machines).
  29. /// Default collection for all variables, except local ones.
  30. /// </summary>
  31. public static string GLOBAL_VARIABLES = "variables";
  32. public static string TRAIN_OP = "train_op";
  33. public static string[] _VARIABLE_COLLECTIONS = new string[] { "variables", "trainable_variables" };
  34. /// <summary>
  35. /// Key to collect BaseSaverBuilder.SaveableObject instances for checkpointing.
  36. /// </summary>
  37. public static string SAVEABLE_OBJECTS = "saveable_objects";
  38. /// <summary>
  39. /// Key to collect update_ops
  40. /// </summary>
  41. public static string UPDATE_OPS = "update_ops";
  42. // Used to store v2 summary names.
  43. public static string _SUMMARY_COLLECTION = "_SUMMARY_V2";
  44. // Key for control flow context.
  45. public static string COND_CONTEXT = "cond_context";
  46. public static string WHILE_CONTEXT = "while_context";
  47. }
  48. }
  49. }

tensorflow框架的.NET版本,提供了丰富的特性和API,可以借此很方便地在.NET平台下搭建深度学习训练与推理流程。