graykode / graykode/nlp-tutorial

Seq2Seq(Attention)Input Shape Question

未关闭
#31 4 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Jupyter Notebook
星标
14.9k
派生
3.9k
PR 合并指标
30 天内没有已合并 PR

描述

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?

贡献指南

打开贡献指南

调研方向

阅读 Seq2Seq(Attention)\Seq2Seq(Attention)-Tensor.py,并跟踪 transpose 和 tf.expand_dims(inputs[i], 1) 表达式中的形状变化。运行示例,并将每个中间形状与所述的 [max_time, batch_size, ...] 预期进行比较。完成意味着确定该扩展是否是有意的,并记录或修正这一行为。

由索引模型根据 Issue 内容生成。

评估

技术栈
python, tensorflow
领域
machine-learning
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
需要澄清
新手友好度
25/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。