张量流中的张量变换0.12

时间:2017-07-19 10:24:24

标签: tensorflow

我已经入侵了双向动态rnn。每个时间步和批处理成员的输出是一个包含168个浮点数的向量,其中119个用于字符预测任务,其余49个用于分类任务。

静态情况收敛得很好,但在动态情况下我遇到了形状推理问题(tensorflow 0.12)。

  outputs = rnn.bidirectional_dynamic_rnn(somestuff, time_major=False, scope="BiLSTM")

outputs具有形状(32,?,168)

- 32  is the batchsize,
- ?   is a placeholder getting fed the max-sequence-length inside the respective batch and
- 168 is my stepwise outputs-size (see above).

我需要处理这个以获得两个张量:

1) with shape (32, ?, 119)
2) with shape (32, ?, 49)

不能理解这个问题。或者让我们这样说:我为静态案例提出的方法涉及到一个堆栈转换。 unstack方法不喜欢占位符作为参数。知道怎么在张量流0.12中从(32,?,168)到(32,?,119)和(32,?,49)?

0 个答案:

没有答案