This is an alternative to #668 that adds Cartesian indexing methods to the existing Embedding layer instead of creating a new CartesianEmbedding layer.
Note that this modifies the Embedding composite type from:
struct Embedding <: AbstractExplicitLayer
in_dims::Int
out_dims::Int
init_weight
end
to:
struct Embedding{N} <: AbstractExplicitLayer
in_dims::NTuple{N, Int}
out_dims::Int
init_weight
end
This is an alternative to #668 that adds Cartesian indexing methods to the existing Embedding layer instead of creating a new CartesianEmbedding layer.
Note that this modifies the Embedding composite type from:
to:
Closes #668.