MCPcopy Create free account
hub / github.com/OpenNMT/CTranslate2 / RandomSampler

Method RandomSampler

src/sampling.cc:35–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33
34
35 RandomSampler::RandomSampler(dim_t from_topk, float topp, float temperature)
36 : _from_topk(from_topk)
37 , _topp(topp)
38 , _temperature(temperature) {
39 }
40
41 void RandomSampler::sample(const StorageView& scores,
42 dim_t num_samples,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected