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.

GlobalMaxPooling2D.cs 1.1 kB

1234567891011121314151617181920212223242526272829303132
  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 GlobalMaxPooling2D : GlobalPooling2D
  9. {
  10. public GlobalMaxPooling2D(Pooling2DArgs args)
  11. : base(args)
  12. {
  13. }
  14. <<<<<<< HEAD
  15. <<<<<<< HEAD
  16. protected override Tensors Call(Tensors inputs, Tensors state = null, bool? training = null, IOptionalArgs? optional_args = null)
  17. =======
  18. protected override Tensors Call(Tensors inputs, Tensor mask = null, bool? training = null, Tensors initial_state = null, Tensors constants = null)
  19. >>>>>>> master
  20. =======
  21. protected override Tensors Call(Tensors inputs, Tensors state = null, bool? training = null, IOptionalArgs? optional_args = null)
  22. >>>>>>> 90a65d7d98b92f26574ac32392ed802a57d4d2c8
  23. {
  24. if (data_format == "channels_last")
  25. return math_ops.reduce_max(inputs, (1, 2), false);
  26. else
  27. return math_ops.reduce_max(inputs, (2, 3), false);
  28. }
  29. }
  30. }