| 291 | } |
| 292 | |
| 293 | Maybe<void> InferFtrlUpdateTensorDesc(user_op::InferContext* ctx) { |
| 294 | const user_op::TensorDesc& model = ctx->InputTensorDesc("model", 0); |
| 295 | const Shape& shape = model.shape(); |
| 296 | const user_op::TensorDesc& model_diff = ctx->InputTensorDesc("model_diff", 0); |
| 297 | CHECK_EQ_OR_RETURN(model_diff.shape(), shape) |
| 298 | << "Model Diff shape is not consistent with Weight shape. "; |
| 299 | const user_op::TensorDesc& accumulate = ctx->InputTensorDesc("accumulate", 0); |
| 300 | const user_op::TensorDesc& z = ctx->InputTensorDesc("z", 0); |
| 301 | JUST(CheckShapeLike(&accumulate, &model)); |
| 302 | JUST(CheckShapeLike(&z, &model)); |
| 303 | JUST(CheckLearningRateShape(ctx)); |
| 304 | return Maybe<void>::Ok(); |
| 305 | } |
| 306 | |
| 307 | Maybe<void> InferFtrlUpdateDataType(user_op::InferContext* ctx) { |
| 308 | const user_op::TensorDesc& model = ctx->InputTensorDesc("model", 0); |
no test coverage detected