Computes the max of the scalar input x and 0.
| 40 | explicit ReluOp(OpKernelConstruction* ctx) : XlaOpKernel(ctx) {} |
| 41 | // Computes the max of the scalar input x and 0. |
| 42 | void Compile(XlaOpKernelContext* ctx) override { |
| 43 | ctx->SetOutput(0, xla::Relu(ctx->Input(0))); |
| 44 | } |
| 45 | }; |
| 46 | REGISTER_XLA_OP(Name("Relu"), ReluOp); |
| 47 |