Description Usage Arguments Details Value
A sampler for use during inference.
1 2 3 4 5 | sampler_sample_embedding(
embedding_fn = NULL,
softmax_temperature = NULL,
seed = NULL
)
|
embedding_fn |
(Optional) A callable that takes a vector tensor of ids (argmax ids), or the params argument for embedding_lookup. The returned tensor will be passed to the decoder input. |
softmax_temperature |
(Optional) float32 scalar, value to divide the logits by before computing the softmax. Larger values (above 1.0) result in more random samples, while smaller values push the sampling distribution towards the argmax. Must be strictly greater than 0. Defaults to 1.0. |
seed |
(Optional) The sampling seed. |
Uses sampling (from a distribution) instead of argmax and passes the result through an embedding layer to get the next input.
None
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.