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

Function ValidateInput

tensorflow/core/kernels/resource_variable_ops.cc:874–881  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

872
873template <typename T>
874bool ValidateInput(const Tensor& updates) {
875 const auto updates_flat = updates.flat<T>();
876 const T zero(0);
877 for (int i = 0; i < updates.NumElements(); i++) {
878 if (updates_flat(i) == zero) return false;
879 }
880 return true;
881}
882
883template <>
884bool ValidateInput<Variant>(const Tensor& updates) {

Callers 1

ComputeMethod · 0.70

Calls 1

NumElementsMethod · 0.45

Tested by

no test coverage detected