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.

GlobalMaxPooling1D.cs 651 B

1234567891011121314151617181920212223
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. using Tensorflow.Keras.ArgsDefinition;
  5. namespace Tensorflow.Keras.Layers
  6. {
  7. public class GlobalMaxPooling1D : GlobalPooling1D
  8. {
  9. public GlobalMaxPooling1D(Pooling1DArgs args)
  10. : base(args)
  11. {
  12. }
  13. protected override Tensors Call(Tensors inputs, Tensor state = null, bool? training = null)
  14. {
  15. if (data_format == "channels_last")
  16. return math_ops.reduce_max(inputs, new int[] { 1 }, false);
  17. else
  18. return math_ops.reduce_max(inputs, new int[] { 2 }, false);
  19. }
  20. }
  21. }