Caffe2 - C++ API
A deep learning, cross platform ML framework
enforce_finite_op.cc
1 #include "caffe2/operators/enforce_finite_op.h"
2 
3 namespace caffe2 {
4 
5 template <>
6 template <typename T>
7 bool EnforceFiniteOp<CPUContext>::DoRunWithType() {
8  EnforceOnCPU<T>(Input(0));
9  return true;
10 }
11 
12 REGISTER_CPU_OPERATOR(EnforceFinite, EnforceFiniteOp<CPUContext>);
13 
14 OPERATOR_SCHEMA(EnforceFinite)
15  .NumInputs(1)
16  .NumOutputs(0)
17  .SetDoc(R"DOC(
18 Raise if there is NaN or Inf values in the input tensor.
19 )DOC")
20  .Input(0, "input", "Input tensor");
21 
22 SHOULD_NOT_DO_GRADIENT(EnforceFinite);
23 
24 } // namespace caffe2
A global dictionary that holds information about what Caffe2 modules have been loaded in the current ...
Definition: blob.h:13