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.

ReLu6.cs 641 B

2 years ago
12345678910111213141516171819202122232425
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. using Tensorflow.Keras.ArgsDefinition;
  5. using Tensorflow.Keras.Engine;
  6. using Tensorflow.Common.Types;
  7. using static Tensorflow.Binding;
  8. namespace Tensorflow.Keras.Layers
  9. {
  10. /// <summary>
  11. /// Leaky version of a Rectified Linear Unit.
  12. /// </summary>
  13. public class ReLu6 : Layer
  14. {
  15. public ReLu6() : base(new LayerArgs { })
  16. {
  17. }
  18. protected override Tensors Call(Tensors inputs, Tensors state = null, bool? training = null, IOptionalArgs? optional_args = null)
  19. {
  20. return tf.nn.relu6(inputs);
  21. }
  22. }
  23. }