1 #include "caffe2/operators/stats_put_ops.h" 2 #include "caffe2/core/operator.h" 3 #include "caffe2/core/stats.h" 4 #include "caffe2/core/tensor.h" 7 #define REGISTER_TEMPLATED_STAT_PUT_OP(OP_NAME, STAT_NAME, STAT_MACRO) \ 9 CAFFE_STAT_CTOR(STAT_NAME); \ 10 STAT_MACRO(stat_value); \ 12 REGISTER_CPU_OPERATOR(OP_NAME, TemplatePutOp<STAT_NAME>); 14 REGISTER_TEMPLATED_STAT_PUT_OP(
17 CAFFE_AVG_EXPORTED_STAT)
19 OPERATOR_SCHEMA(AveragePut)
24 "(*str*): name of the stat. If not present, then uses name of input blob")
27 "(*int64_t*): number to multiply input values by (used when inputting floats, as stats can only receive integers")
30 "(*
boolean*): whether or not to clamp inputs to the max inputs allowed")
33 "(*
float*): Optionally provide a default value for recieving empty tensors")
35 Consume a value and pushes it to the global stat registry as an average.
44 "(*
Tensor`<number>`*):
A scalar tensor, representing any numeric value");
46 REGISTER_TEMPLATED_STAT_PUT_OP(
51 OPERATOR_SCHEMA(IncrementPut)
56 "(*str*): name of the stat. If not present, then uses name of input blob")
59 "(*int64_t*): number to multiply input values by (used when inputting floats, as stats can only receive integers")
62 "(*
boolean*): whether or not to clamp inputs to the max inputs allowed")
65 "(*
float*): Optionally provide a default value for recieving empty tensors")
67 Consume a value and pushes it to the global stat registry as an sum.
76 "(*
Tensor`<number>`*):
A scalar tensor, representing any numeric value");
78 REGISTER_TEMPLATED_STAT_PUT_OP(
81 CAFFE_STDDEV_EXPORTED_STAT)
83 OPERATOR_SCHEMA(StdDevPut)
88 "(*str*): name of the stat. If not present, then uses name of input blob")
91 "(*int64_t*): number to multiply input values by (used when inputting floats, as stats can only receive integers")
94 "(*
boolean*): whether or not to clamp inputs to the max inputs allowed")
97 "(*
float*): Optionally provide a default value for recieving empty tensors")
99 Consume a value and pushes it to the global stat registry as an standard deviation.
108 "(*
Tensor`<number>`*):
A scalar tensor, representing any numeric value");
A global dictionary that holds information about what Caffe2 modules have been loaded in the current ...