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

Method Update

tensorflow/core/kernels/range_sampler.cc:193–200  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

191}
192
193void ThreadUnsafeUnigramSampler::Update(ArraySlice<int64> values) {
194 int num_updates = std::min(static_cast<int>(values.size()),
195 kint32max - picker_.total_weight());
196 for (int i = 0; i < num_updates; i++) {
197 const int64 value = values[i];
198 picker_.set_weight(value, picker_.get_weight(value) + 1);
199 }
200}
201
202// Thread-safe unigram sampler
203UnigramSampler::UnigramSampler(int64 range)

Callers 15

UpdateSummaryMethod · 0.45
TESTFunction · 0.45
ShouldFinishMethod · 0.45
MainLoopMethod · 0.45
ComputeMethod · 0.45
Update1Method · 0.45
Update2Method · 0.45
CheckResultMethod · 0.45
GetNextInternalMethod · 0.45
ComputeAsyncMethod · 0.45
TryInitMethod · 0.45
GetNextInternalMethod · 0.45

Calls 5

total_weightMethod · 0.80
set_weightMethod · 0.80
minFunction · 0.50
sizeMethod · 0.45
get_weightMethod · 0.45

Tested by 3

TESTFunction · 0.36
Update1Method · 0.36
Update2Method · 0.36