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 3.5 kB

6 years ago
6 years ago
6 years ago
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. /*****************************************************************************
  2. Copyright 2018 The TensorFlow.NET Authors. All Rights Reserved.
  3. Licensed under the Apache License, Version 2.0 (the "License");
  4. you may not use this file except in compliance with the License.
  5. You may obtain a copy of the License at
  6. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License.
  12. ******************************************************************************/
  13. namespace Tensorflow
  14. {
  15. public partial class ops
  16. {
  17. /// <summary>
  18. /// Standard names to use for graph collections.
  19. /// The standard library uses various well-known names to collect and
  20. /// retrieve values associated with a graph. For example, the
  21. /// `tf.Optimizer` subclasses default to optimizing the variables
  22. /// collected under `tf.GraphKeys.TRAINABLE_VARIABLES` if none is
  23. /// specified, but it is also possible to pass an explicit list of
  24. /// variables.
  25. /// </summary>
  26. public static class GraphKeys
  27. {
  28. /// <summary>
  29. /// the subset of `Variable` objects that will be trained by an optimizer.
  30. /// </summary>
  31. public static string TRAINABLE_VARIABLES = "trainable_variables";
  32. /// <summary>
  33. /// Trainable resource-style variables.
  34. /// </summary>
  35. public static string TRAINABLE_RESOURCE_VARIABLES = "trainable_resource_variables";
  36. /// <summary>
  37. /// Key for streaming model ports.
  38. /// </summary>
  39. public static string _STREAMING_MODEL_PORTS = "streaming_model_ports";
  40. /// <summary>
  41. /// Key to collect losses
  42. /// </summary>
  43. public const string LOSSES = "losses";
  44. /// <summary>
  45. /// Key to collect Variable objects that are global (shared across machines).
  46. /// Default collection for all variables, except local ones.
  47. /// </summary>
  48. public static string GLOBAL_VARIABLES = "variables";
  49. public static string TRAIN_OP = "train_op";
  50. public static string GLOBAL_STEP = GLOBAL_STEP = "global_step";
  51. public static string[] _VARIABLE_COLLECTIONS = new string[] { "variables", "trainable_variables", "model_variables" };
  52. /// <summary>
  53. /// Key to collect BaseSaverBuilder.SaveableObject instances for checkpointing.
  54. /// </summary>
  55. public static string SAVEABLE_OBJECTS = "saveable_objects";
  56. /// <summary>
  57. /// Key to collect update_ops
  58. /// </summary>
  59. public static string UPDATE_OPS = "update_ops";
  60. // Key to collect summaries.
  61. public const string SUMMARIES = "summaries";
  62. // Used to store v2 summary names.
  63. public static string _SUMMARY_COLLECTION = "_SUMMARY_V2";
  64. // Key for control flow context.
  65. public static string COND_CONTEXT = "cond_context";
  66. public static string WHILE_CONTEXT = "while_context";
  67. }
  68. }
  69. }