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 692 B

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