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.

correlation.h 1.4 kB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #pragma once
  2. #include "megdnn/basic_types.h"
  3. #include "megdnn/opr_param_defs.h"
  4. namespace megdnn {
  5. namespace test {
  6. namespace correlation {
  7. struct TestArg {
  8. param::Correlation param;
  9. TensorShape data1, data2;
  10. TestArg(param::Correlation param, TensorShape data1, TensorShape data2)
  11. : param(param), data1(data1), data2(data2) {}
  12. };
  13. inline static std::vector<TestArg> get_args() {
  14. std::vector<TestArg> args;
  15. param::Correlation cur_param;
  16. for (size_t batch_size : {2}) {
  17. for (size_t channel : {2}) {
  18. for (size_t height : {160}) {
  19. for (size_t width : {160}) {
  20. cur_param.is_multiply = true;
  21. cur_param.kernel_size = 3;
  22. cur_param.max_displacement = 3;
  23. cur_param.pad_size = 0;
  24. cur_param.stride1 = 1;
  25. cur_param.stride2 = 1;
  26. cur_param.format = megdnn::param::Correlation::Format::NCHW;
  27. args.emplace_back(
  28. cur_param, TensorShape{batch_size, channel, height, width},
  29. TensorShape{batch_size, channel, height, width});
  30. }
  31. }
  32. }
  33. }
  34. return args;
  35. }
  36. } // namespace correlation
  37. } // namespace test
  38. } // namespace megdnn
  39. // vim: syntax=cpp.doxygen