MCPcopy Create free account
hub / github.com/Oneflow-Inc/oneflow / InferAdagradUpdateTensorDesc

Function InferAdagradUpdateTensorDesc

oneflow/user/ops/model_update_ops.cpp:219–228  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

217}
218
219Maybe<void> InferAdagradUpdateTensorDesc(user_op::InferContext* ctx) {
220 const user_op::TensorDesc& model = ctx->InputTensorDesc("model", 0);
221 const Shape& shape = model.shape();
222 const user_op::TensorDesc& model_diff = ctx->InputTensorDesc("model_diff", 0);
223 CHECK_EQ_OR_RETURN(model_diff.shape(), shape);
224 const user_op::TensorDesc& sum = ctx->InputTensorDesc("sum", 0);
225 JUST(CheckShapeLike(&sum, &model));
226 JUST(CheckLearningRateShape(ctx));
227 return Maybe<void>::Ok();
228}
229
230Maybe<void> InferAdagradUpdateDataType(user_op::InferContext* ctx) {
231 const user_op::TensorDesc& model = ctx->InputTensorDesc("model", 0);

Callers 1

Calls 3

CheckShapeLikeFunction · 0.70
CheckLearningRateShapeFunction · 0.70
shapeMethod · 0.45

Tested by

no test coverage detected