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

Function IsDtypeTrainable

tensorflow/c/eager/tape.h:322–336  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

320// Template instantiations here
321
322inline bool IsDtypeTrainable(DataType dtype) {
323 switch (dtype) {
324 case DT_HALF:
325 case DT_BFLOAT16:
326 case DT_FLOAT:
327 case DT_DOUBLE:
328 case DT_COMPLEX64:
329 case DT_COMPLEX128:
330 case DT_RESOURCE:
331 case DT_VARIANT:
332 return true;
333 default:
334 return false;
335 }
336}
337
338template <typename Gradient, typename BackwardFunction, typename TapeTensor>
339bool GradientTape<Gradient, BackwardFunction, TapeTensor>::ShouldRecord(

Callers 2

ShouldRecordMethod · 0.85
AccumulateMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected