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

Method total_size

tensorflow/core/kernels/lookup_util.cc:164–175  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

162 Status status() const override { return status_; }
163
164 int64 total_size() const override {
165 if (vocab_size_ == -1) {
166 int64 new_size = -1;
167 Status status = GetNumLinesInTextFile(env_, filename_, &new_size);
168 if (!status.ok()) {
169 LOG(WARNING) << "Unable to get line count: " << status;
170 new_size = -1;
171 }
172 *const_cast<int64*>(&vocab_size_) = new_size;
173 }
174 return vocab_size_;
175 }
176
177 private:
178 Tensor key_;

Callers 2

InitializeMethod · 0.45
AreEntriesSameMethod · 0.45

Calls 2

GetNumLinesInTextFileFunction · 0.85
okMethod · 0.45

Tested by

no test coverage detected