graykode / graykode/nlp-tutorial
Seq2Seq(Attention)Input Shape Question
- Dominant language
- Jupyter Notebook
- Stars
- 14.9k
- Forks
- 3.9k
- PR merge metrics
- No merged PRs in 30d
Description
Seq2Seq(Attention)\Seq2Seq(Attention)-Tensor.py
The shape of the input should be [max_time, batch_size,...]. The input = tf. transpose (dec_inputs, [1, 0, 2]) has already been transformed. In tf. expand_dims (inputs [i], 1), the expansion is indeed one dimension. It seems that there should be zero dimension expansion here. Although the final shape is correct, whether it is intentional or not is here. What about a little trick?
Contributor guide
Research direction
Read Seq2Seq(Attention)\Seq2Seq(Attention)-Tensor.py and trace the shapes through the transpose and tf.expand_dims(inputs[i], 1) expressions. Run the example and compare each intermediate shape with the stated [max_time, batch_size, ...] expectation. Done means deciding whether the expansion is intentional and documenting or correcting the behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, tensorflow
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100