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

Function DoValidationChecking

tensorflow/core/kernels/scatter_op.cc:56–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54}
55
56static void DoValidationChecking(OpKernelContext* c, const Tensor& params,
57 const Tensor& indices, const Tensor& updates) {
58 OP_REQUIRES(c, params.IsInitialized(),
59 errors::FailedPrecondition("Null ref for params"));
60 OP_REQUIRES(c, TensorShapeUtils::IsVectorOrHigher(params.shape()),
61 errors::InvalidArgument("params must be at least 1-D, got shape ",
62 params.shape().DebugString()));
63 OP_REQUIRES(
64 c, ValidShapes(params, updates, indices),
65 errors::InvalidArgument("Must have updates.shape = indices.shape + "
66 "params.shape[1:] or updates.shape = [], got ",
67 "updates.shape ", updates.shape().DebugString(),
68 ", indices.shape ", indices.shape().DebugString(),
69 ", params.shape ", params.shape().DebugString()));
70}
71
72template <typename Device, typename T, typename Index, scatter_op::UpdateOp op>
73class ScatterUpdateOp : public OpKernel {

Callers 2

DoComputeMethod · 0.85
DoComputeMethod · 0.85

Calls 6

FailedPreconditionFunction · 0.85
InvalidArgumentFunction · 0.85
ValidShapesFunction · 0.85
IsInitializedMethod · 0.45
shapeMethod · 0.45
DebugStringMethod · 0.45

Tested by

no test coverage detected