NLP问题
(1)ValueError: rate must be a scalar tensor or a float in the range [0, 1), got 64 问题解决
dropout设置参数应该再[0,1]之间
(2)nltk包导入问题 wordnet等需要自己下载
解决方式参考:https://blog.csdn.net/weixin_44660150/article/details/107144469
(3)显示所有数据项
加一句 pd.set_option(‘display.max_columns’, None) 就可以显示全部的列
(4)【报错解决】Cannot convert a symbolic Tensor to a numpy array
NotImplementedError: Cannot convert a symbolic Tensor (lstm_15/strided_slice:0) to a numpy array. This error may indicate that you’re trying to pass a Tensor to a NumPy call, which is not supported
降低numpy库的版本
pip install -U numpy==1.19.2 -i https://pypi.douban.com/simple/
tensorflow 2.5 对应 numpy1.19.2
(5)plt绘制图表标题显示乱码
plt.rcParams[‘font.sans-serif’] = [‘SimHei’] # 用来正常显示中文标签
plt.rcParams[‘axes.unicode_minus’] = False # 用来正常显示负号