MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / IfOp

Method IfOp

tensorflow/core/kernels/functional_ops.cc:129–134  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

127class IfOp : public AsyncOpKernel {
128 public:
129 explicit IfOp(OpKernelConstruction* ctx) : AsyncOpKernel(ctx) {
130 auto lib = ctx->function_library();
131 OP_REQUIRES(ctx, lib != nullptr, errors::Internal("No function library"));
132 OP_REQUIRES_OK(ctx, ctx->GetAttr("then_branch", &then_func_));
133 OP_REQUIRES_OK(ctx, ctx->GetAttr("else_branch", &else_func_));
134 }
135
136 ~IfOp() override {}
137

Callers

nothing calls this directly

Calls 3

InternalFunction · 0.85
function_libraryMethod · 0.45
GetAttrMethod · 0.45

Tested by

no test coverage detected