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

Method DumpEv

tensorflow/core/kernels/save_restore_v2_ops.cc:122–137  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

120
121 template <typename TKey, typename TValue, typename TGlobalStep>
122 void DumpEv(OpKernelContext* context, int variable_index,
123 const string& tensor_name, BundleWriter& writer) {
124 EmbeddingVar<TKey, TValue>* variable = nullptr;
125 OP_REQUIRES_OK(context,
126 LookupResource(context,
127 HandleFromInput(context, variable_index), &variable));
128 const Tensor& global_step = context->input(3);
129 TGlobalStep global_step_scalar = global_step.scalar<TGlobalStep>()();
130 core::ScopedUnref s(variable);
131 embedding::ShrinkArgs shrink_args;
132 shrink_args.global_step = global_step_scalar;
133 const Tensor& prefix = context->input(0);
134 const string& prefix_string = prefix.scalar<tstring>()();
135 OP_REQUIRES_OK(context, variable->Save(tensor_name,
136 prefix_string, &writer, shrink_args));
137 }
138
139 void Compute(OpKernelContext* context) override {
140 const Tensor& prefix = context->input(0);

Callers

nothing calls this directly

Calls 4

LookupResourceFunction · 0.85
HandleFromInputFunction · 0.85
inputMethod · 0.45
SaveMethod · 0.45

Tested by

no test coverage detected