Comments (4)
dynamic-seq2seq/dynamic_seq2seq_model.py
Line 172 in 8358ffd
默认问答最大长度差在10倍以内,你可以将10调大
from dynamic-seq2seq.
@yanwii
谢谢,在关闭问题中已经发现问题所在了
from dynamic-seq2seq.
@yanwii
你好 我用自己的数据训练模型 也出现这个问题,问题描述如下:
InvalidArgumentError (see above for traceback): logits and labels must have the same first dimension, got logits shape [240,1516] and labels shape [260]
[[Node: sequence_loss/SparseSoftmaxCrossEntropyWithLogits/SparseSoftmaxCrossEntropyWithLogits = SparseSoftmaxCrossEntropyWithLogits[T=DT_FLOAT, Tlabels=DT_INT32, _device="/job:localhost/replica:0/task:0/device:GPU:0"](sequence_loss/Reshape, sequence_loss/Reshape_1/_509)]]
我修改了这个参数 (原来是20),比如30,还是报改错误,请问是什么原因呢,非常感谢。
from dynamic-seq2seq.
因为decoder是支持变长的,但这个长度需要我们手动指定
maximum_iterations = tf.round(tf.reduce_max(self.encoder_inputs_length) * 10)
可以看到最大迭代次数是encoder最大长度的10倍, 说明你的decoder输出比encoder最大长度的10(30)倍还要打,这就造成了在计算loss的时候不能对齐,解决方法就是调大点,或者控制decoder的长度,当然也可以在计算loss的时候进行对齐操作。
from dynamic-seq2seq.
Related Issues (20)
- 训练报错--assert len(self.data) > 0, ValueError("训练数据为空") HOT 1
- 怎么样动态查询天气? HOT 1
- 训练自己的预料库出现了问题,decoder_label的维度和logits的维度不匹配 HOT 9
- 请问你在训练模型的时候训练了多久啊? HOT 4
- 模型训练 HOT 3
- 大神,请问为什么我训练的数据一直不收敛啊
- 每个回答后面都有__EOS__
- 你好,请问这个是说我没有训练吗?我看里面有你之前训练的模型,我直接拿来试一试。 HOT 6
- 我加入一个循环输入之后,运行一直卡在这里,请问大神知道原因吗? HOT 3
- [Error] 出現not found model HOT 1
- 生成词向量用的是什么方法啊? HOT 1
- 我使用了小黄鸡的语料,loss值在1左右,但是效果还是很差 HOT 1
- 没有过滤掉词频较小的词? HOT 1
- 多轮对话的程序有进展吗
- 训练时,label与logits第一维度不匹配 HOT 10
- 是否能提供一個接口餵入pre training的Embedding
- error HOT 2
- encoder_vocab_size 如何设置? HOT 10
- train error HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dynamic-seq2seq.