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.

operators.md 1.8 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. * [absval](#absval)
  2. * [argmax](#argmax)
  3. * [batchnorm](#batchnorm)
  4. * [bias](#bias)
  5. * [clip](#clip)
  6. * [concat](#concat)
  7. * [convolution](#convolution)
  8. # absval
  9. ```
  10. y = abs(x)
  11. ```
  12. * one_blob_only
  13. * support_inplace
  14. # argmax
  15. ```
  16. y = argmax(x, out_max_val, topk)
  17. ```
  18. * one_blob_only
  19. |param id|name|type|default|
  20. |--|--|--|--|
  21. |0|out_max_val|int|0|
  22. |1|topk|int|1|
  23. # batchnorm
  24. ```
  25. y = (x - mean) / sqrt(var + eps) * slope + bias
  26. ```
  27. * one_blob_only
  28. * support_inplace
  29. |param id|name|type|default|
  30. |--|--|--|--|
  31. |0|channels|int|0|
  32. |1|eps|float|0.f|
  33. |weight|type|
  34. |--|--|
  35. |slope_data|float|
  36. |mean_data|float|
  37. |var_data|float|
  38. |bias_data|float|
  39. # bias
  40. ```
  41. y = x + bias
  42. ```
  43. * one_blob_only
  44. * support_inplace
  45. |param id|name|type|default|
  46. |--|--|--|--|
  47. |0|bias_data_size|int|0|
  48. |weight|type|
  49. |--|--|
  50. |bias_data|float|
  51. # clip
  52. ```
  53. y = clamp(x, min, max)
  54. ```
  55. * one_blob_only
  56. * support_inplace
  57. |param id|name|type|default|
  58. |--|--|--|--|
  59. |0|min|float|-FLT_MAX|
  60. |1|max|float|FLT_MAX|
  61. # concat
  62. ```
  63. y = concat(x0, x1, x2, ...) by axis
  64. ```
  65. |param id|name|type|default|
  66. |--|--|--|--|
  67. |0|axis|int|0|
  68. # convolution
  69. ```
  70. x2 = pad(x, pads, pad_value)
  71. x3 = conv(x2, weight, kernel, stride, dilation) + bias
  72. y = activation(x3, act_type, act_params)
  73. ```
  74. * one_blob_only
  75. |param id|name|type|default|
  76. |--|--|--|--|
  77. |0|num_output|int|0|
  78. |1|kernel_w|int|0|
  79. |2|dilation_w|int|1|
  80. |3|stride_w|int|1|
  81. |4|pad_left|int|0|
  82. |5|bias_term|int|0|
  83. |6|weight_data_size|int|0|
  84. |8|int8_scale_term|int|0|
  85. |9|activation_type|int|0|
  86. |10|activation_params|array|[ ]|
  87. |11|kernel_h|int|kernel_w|
  88. |12|dilation_h|int|dilation_w|
  89. |13|stride_h|int|stride_w|
  90. |15|pad_right|int|pad_left|
  91. |14|pad_top|int|pad_left|
  92. |16|pad_bottom|int|pad_top|
  93. |18|pad_value|float|0.f|
  94. |weight|type|
  95. |--|--|
  96. |weight_data|float/fp16/int8|
  97. |bias_data|float|