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

Method DeleteGradient

tensorflow/c/eager/tape.h:1067–1074  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1065
1066template <typename Gradient, typename BackwardFunction, typename TapeTensor>
1067void ForwardAccumulator<Gradient, BackwardFunction, TapeTensor>::DeleteGradient(
1068 int64 tensor_id) {
1069 auto existing = accumulated_gradients_.find(tensor_id);
1070 if (existing != accumulated_gradients_.end()) {
1071 vspace_.DeleteGradient(existing->second);
1072 accumulated_gradients_.erase(existing);
1073 }
1074}
1075
1076template <typename Gradient, typename BackwardFunction, typename TapeTensor>
1077Gradient* ForwardAccumulator<Gradient, BackwardFunction, TapeTensor>::FetchJVP(

Callers 4

~ForwardAccumulatorMethod · 0.45
ComputeGradientMethod · 0.45
ForwardpropFromTapeMethod · 0.45
AccumulateMethod · 0.45

Calls 3

findMethod · 0.45
endMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected