Current section
Files
Jump to
Current section
Files
lib/xberg/sparse_embedding.ex
# This file is auto-generated by alef — DO NOT EDIT.
# alef:hash:86e3b491373cb06a224074d5c175e5bf4c341443fbe2e0370128e5b090afde61
# To regenerate: alef generate
# To verify freshness: alef verify --exit-code
defmodule Xberg.SparseEmbedding do
@moduledoc """
A sparse learned embedding: vocabulary term indices and their weights.
`indices` are ascending vocabulary token ids; `values[i]` is the weight for
`indices[i]`. The two arrays always have equal length. Only strictly-positive
terms are retained, so the representation is genuinely sparse.
Since v5.0.0.
"""
@typedoc "A sparse learned embedding: vocabulary term indices and their weights."
@type t :: %__MODULE__{
indices: [non_neg_integer()],
values: [float()]
}
defstruct indices: [],
values: []
end