We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 14b395b commit 87bc175Copy full SHA for 87bc175
zero_out.cpp
@@ -0,0 +1,12 @@
1
+#include "tensorflow/core/framework/op.h"
2
+#include "tensorflow/core/framework/shape_inference.h"
3
+
4
+using namespace tensorflow;
5
6
+REGISTER_OP("ZeroOut")
7
+ .Input("to_zero: int32")
8
+ .Output("zeroed: int32")
9
+ .SetShapeFn([](::tensorflow::shape_inference::InferenceContext* c) {
10
+ c->set_output(0, c->input(0));
11
+ return Status::OK();
12
+ });
0 commit comments