1 #include <caffe2/ideep/ideep_utils.h> 7 USE_IDEEP_DEF_ALIASES();
8 USE_IDEEP_OPERATOR_FUNCTIONS();
15 bool RunOnDevice()
override {
16 const auto& X = Input(INPUT);
17 auto* Y = Output(OUTPUT);
19 ideep::eltwise_forward::compute(
20 X, *Y, ialgo::eltwise_logistic, iprop::forward_training);
33 USE_IDEEP_DEF_ALIASES();
34 USE_IDEEP_OPERATOR_FUNCTIONS();
41 bool RunOnDevice()
override {
42 const auto& Y = Input(OUTPUT);
43 const auto& dY = Input(OUTPUT_GRAD);
44 auto* dX = Output(INPUT_GRAD);
46 ideep::eltwise_backward::compute(Y, dY, *dX, ialgo::eltwise_logistic);
53 INPUT_TAGS(OUTPUT, OUTPUT_GRAD);
54 OUTPUT_TAGS(INPUT_GRAD);
sigmoid(x) = (tanh(x/2) + 1)/2 Quantized sigmoid is computed as tanh under the hood, we just use different input/output quantization parameters.
Workspace is a class that holds all the related objects created during runtime: (1) all blobs...
A global dictionary that holds information about what Caffe2 modules have been loaded in the current ...