zh-NER-keras icon indicating copy to clipboard operation
zh-NER-keras copied to clipboard

'Tensor' object has no attribute 'assign'"

Open yufangzhao opened this issue 6 years ago • 8 comments

遇到了这么个错误,是什么原因,请问你用的tensorflow版本号多少,我用的1.8 ("'Tensor' object has no attribute 'assign'",)

image

yufangzhao avatar Jun 12 '18 01:06 yufangzhao

你换成1.4使用下了。

stephen-v avatar Jun 14 '18 00:06 stephen-v

我也遇到这个错误提示,把 if platform.system() == 'Windows': split_text = '\r\n' else: split_text = '\n' 替换为 split_text = '\n' 就可以了。

luolitao avatar Jun 21 '18 09:06 luolitao

你是什么操作系统?

stephen-v avatar Jun 22 '18 01:06 stephen-v

windows10 tensorflow1.8

luolitao avatar Jun 22 '18 01:06 luolitao

将 if platform.system() == 'Windows': split_text = '\r\n' else: split_text = '\n' 替换为 split_text = '\n' 预测的效果不准确了:['person: 0国以', 'location:', 'organzation:']

PrivateThink avatar Jul 17 '18 10:07 PrivateThink

@PrivateThink 检查一下数据集的换行的格式是windows、unix还是mac,根据格式确定split_text的选择,分别为: windows ‘\n’, unix '\r\n' mac '\r'

luolitao avatar Jul 21 '18 02:07 luolitao

我还想提这个建议,确实是,windows下面是“\n”

631086083 avatar Mar 29 '19 07:03 631086083

高手在人间

wy2018104072 avatar Aug 09 '19 08:08 wy2018104072