-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
beam search cannot be parsed correctly. #2385
Comments
以上错误的原因是:
|
|
如果不通过规则来修正 例如下面这种方式: 在 |
def __get_used_submodels__(layer_names):
submodel_names = set()
for submodel in cp.g_config.model_config.sub_models:
if submodel.name in layer_names:
submodel_names.add(submodel.name)
if submodel.is_recurrent_layer_group:
layer_names |= set(submodel.layer_names)
return submodel_names 按照上述代码,修改 但会出现另一个 bug:
出错信息如下:
|
生成时这个特殊的 data_layer 可以用比较简单的方式解决,因为,这个data layer 实际上恰好已经被指定为整个网络的输出,可以判断已经被指定为输出的 data_layer 不再被加入作为整个网络的输入。 正在测试。 |
eos这个问题修改一下v2/layer.py 里的 def add_additional_parents() 可以解决 |
通过 |
This PR Fix V2 API #2288 changes the way v2 APIs parse the network configuration. But currently,
beam search
cannot be parsed correctly. It causes bugs to machine translation in PaddleBook.This PR fix bugs of parsing network topology in text generation task #2384 fix the training process but hasn't fixed bugs in the generation.
I change
is_generating=True
in this line https://github.com/PaddlePaddle/book/blob/develop/08.machine_translation/train.py#L129, the error information go as followsBesideseos_layer
, several other layers are not created in generation.The text was updated successfully, but these errors were encountered: