2020-10-19

今天用tensorflow2.0 版本做CRF,在keras的embeeing层用了mask_zero=True,注意,如果使用了找个参数,并且后续保存了模型,那么在加载模型的时候,就会报以下warning

==================================================================================

2020-10-19 11:36:26.748224: W tensorflow/core/graph/graph_constructor.cc:773] Node 'while' has 14 outputs but the _output_shapes attribute specifies shapes for 48 outputs. Output shapes may be inaccurate.
2020-10-19 11:36:26.764463: W tensorflow/core/graph/graph_constructor.cc:773] Node 'cond' has 5 outputs but the _output_shapes attribute specifies shapes for 46 outputs. Output shapes may be inaccurate.
2020-10-19 11:36:26.806143: W tensorflow/core/graph/graph_constructor.cc:773] Node 'while' has 14 outputs but the _output_shapes attribute specifies shapes for 48 outputs. Output shapes may be inaccurate.
2020-10-19 11:36:26.903796: W tensorflow/core/graph/graph_constructor.cc:773] Node 'while' has 14 outputs but the _output_shapes attribute specifies shapes for 48 outputs. Output shapes may be inaccurate.
2020-10-19 11:36:26.920604: W tensorflow/core/graph/graph_constructor.cc:773] Node 'cond' has 5 outputs but the _output_shapes attribute specifies shapes for 46 outputs. Output shapes may be inaccurate.
2020-10-19 11:36:27.776099: W tensorflow/core/graph/graph_constructor.cc:773] Node 'while' has 14 outputs but the _output_shapes attribute specifies shapes for 48 outputs. Output shapes may be inaccurate.
2020-10-19 11:36:27.792608: W tensorflow/core/graph/graph_constructor.cc:773] Node 'cond' has 5 outputs but the _output_shapes attribute specifies shapes for 46 outputs. Output shapes may be inaccurate.
2020-10-19 11:36:29.533497: W tensorflow/core/graph/graph_constructor.cc:773] Node 'while' has 14 outputs but the _output_shapes attribute specifies shapes for 48 outputs. Output shapes may be inaccurate.
2020-10-19 11:36:30.060008: W tensorflow/core/graph/graph_constructor.cc:773] Node 'cond' has 5 outputs but the _output_shapes attribute specifies shapes for 46 outputs. Output shapes may be inaccurate.
2020-10-19 11:36:30.333742: W tensorflow/core/graph/graph_constructor.cc:773] Node 'while' has 14 outputs but the _output_shapes attribute specifies shapes for 48 outputs. Output shapes may be inaccurate.
2020-10-19 11:36:30.350027: W tensorflow/core/graph/graph_constructor.cc:773] Node 'cond' has 5 outputs but the _output_shapes attribute specifies shapes for 46 outputs. Output shapes may be inaccurate.
2020-10-19 11:36:30.606367: W tensorflow/core/graph/graph_constructor.cc:773] Node 'while' has 14 outputs but the _output_shapes attribute specifies shapes for 48 outputs. Output shapes may be inaccurate.
2020-10-19 11:36:30.625399: W tensorflow/core/graph/graph_constructor.cc:773] Node 'cond' has 5 outputs but the _output_shapes attribute specifies shapes for 46 outputs. Output shapes may be inaccurate.
2020-10-19 11:36:31.085848: W tensorflow/core/graph/graph_constructor.cc:773] Node 'while' has 14 outputs but the _output_shapes attribute specifies shapes for 48 outputs. Output shapes may be inaccurate.
2020-10-19 11:36:31.102826: W tensorflow/core/graph/graph_constructor.cc:773] Node 'cond' has 5 outputs but the _output_shapes attribute specifies shapes for 46 outputs. Output shapes may be inaccurate.
2020-10-19 11:36:31.604162: W tensorflow/core/graph/graph_constructor.cc:773] Node 'while' has 14 outputs but the _output_shapes attribute specifies shapes for 48 outputs. Output shapes may be inaccurate.
2020-10-19 11:36:31.620534: W tensorflow/core/graph/graph_constructor.cc:773] Node 'cond' has 5 outputs but the _output_shapes attribute specifies shapes for 46 outputs. Output shapes may be inaccurate.
2020-10-19 11:36:31.790761: W tensorflow/core/graph/graph_constructor.cc:773] Node 'while' has 14 outputs but the _output_shapes attribute specifies shapes for 48 outputs. Output shapes may be inaccurate.
2020-10-19 11:36:31.807026: W tensorflow/core/graph/graph_constructor.cc:773] Node 'cond' has 5 outputs but the _output_shapes attribute specifies shapes for 46 outputs. Output shapes may be inaccurate.
2020-10-19 11:36:31.973121: W tensorflow/core/graph/graph_constructor.cc:773] Node 'while' has 14 outputs but the _output_shapes attribute specifies shapes for 48 outputs. Output shapes may be inaccurate.
2020-10-19 11:36:31.993655: W tensorflow/core/graph/graph_constructor.cc:773] Node 'cond' has 5 outputs but the _output_shapes attribute specifies shapes for 46 outputs. Output shapes may be inaccurate.
2020-10-19 11:36:32.025578: W tensorflow/core/graph/graph_constructor.cc:773] Node 'cond' has 5 outputs but the _output_shapes attribute specifies shapes for 46 outputs. Output shapes may be inaccurate.
2020-10-19 11:36:32.349684: W tensorflow/core/graph/graph_constructor.cc:773] Node 'while' has 14 outputs but the _output_shapes attribute specifies shapes for 48 outputs. Output shapes may be inaccurate.
2020-10-19 11:36:32.365774: W tensorflow/core/graph/graph_constructor.cc:773] Node 'cond' has 5 outputs but the _output_shapes attribute specifies shapes for 46 outputs. Output shapes may be inaccurate.
2020-10-19 11:36:32.860289: W tensorflow/core/graph/graph_constructor.cc:773] Node 'while' has 14 outputs but the _output_shapes attribute specifies shapes for 48 outputs. Output shapes may be inaccurate.
2020-10-19 11:36:32.877246: W tensorflow/core/graph/graph_constructor.cc:773] Node 'cond' has 5 outputs but the _output_shapes attribute specifies shapes for 46 outputs. Output shapes may be inaccurate.
2020-10-19 11:36:32.904571: W tensorflow/core/graph/graph_constructor.cc:773] Node 'while' has 14 outputs but the _output_shapes attribute specifies shapes for 48 outputs. Output shapes may be inaccurate.
2020-10-19 11:36:32.920824: W tensorflow/core/graph/graph_constructor.cc:773] Node 'cond' has 5 outputs but the _output_shapes attribute specifies shapes for 46 outputs. Output shapes may be inaccurate.

===================================================================================

虽然只要把embeding层的mask_zero设置成False就可“隐藏”这个问题,但是显然这不是一个有效的解决方法,很遗憾的是,我也只是发现了这个问题,但是并没有找到解决问题的办法。

 

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值