clab / clab/dynet

Transposed shape in lookup parameters?

Open
#971 10 comments 0 reactions 0 assignees View on GitHub
moderate bug
Dominant language
C++
Stars
3.4k
Forks
701
PR merge metrics
No merged PRs in 30d

Description

`dy.Model().add_lookup_parameters((2, 3)).shape()` returns `(3, 2)`.

The doc says that:
- The first argument of `add_lookup_parameters` is the "shape of the parameter. The first dimension is the vocab size" [[1]](https://dynet.readthedocs.io/en/latest/python_ref.html#dynet.ParameterCollection.add_lookup_parameters)
- When called on a lookup parameter, `shape()` returns the "shape of the lookup parameter. The first dimension is the lookup dimension" [[2]](https://dynet.readthedocs.io/en/latest/python_ref.html#dynet.LookupParameters.shape)

Unless I'm mistaken, "vocab size" and "size of the lookup dimension" refer to the same thing, so shouldn't `shape()` return the declared shape?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.