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.

Exponential.cs 842 B

123456789101112131415161718192021222324252627282930
  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.Keras.Saving;
  7. using static Tensorflow.Binding;
  8. namespace Tensorflow.Keras.Layers {
  9. public class Exponential : Layer
  10. {
  11. public Exponential(LayerArgs args) : base(args)
  12. {
  13. // Exponential has no args
  14. }
  15. public override void build(KerasShapesWrapper input_shape)
  16. {
  17. base.build(input_shape);
  18. }
  19. protected override Tensors Call(Tensors inputs, Tensor state = null, bool? training = null)
  20. {
  21. Tensor output = inputs;
  22. return tf.exp(output);
  23. }
  24. public override Shape ComputeOutputShape(Shape input_shape)
  25. {
  26. return input_shape;
  27. }
  28. }
  29. }