dragen1860 / Deep-Learning-with-TensorFlow-book

深度学习入门开源书,基于TensorFlow 2.0案例实战。Open source Deep Learning book, based on TensorFlow 2.0 framework.
http://www.ai101edu.com
13.21k stars 4.08k forks source link

11.5代码运行出错对应ch11-循环神经网络 #183

Open Riley-coder7 opened 4 years ago

Riley-coder7 commented 4 years ago

11.5代码运行出错,对应ch11-循环神经网络下的sentiment_analysis_cell.py

redfrogotr commented 4 years ago
model.compile(optimizer=optimizers.RMSprop(0.001),
                  loss=losses.BinaryCrossentropy(),
                  metrics=['accuracy'],
                  experimental_run_tf_function=False) # 你可以尝试加上这个

这样就不会报错了,在main函数里

tengwang0318 commented 3 years ago

我还是会遇到这个error:call() takes 2 positional arguments but 3 were given

redfrogotr commented 3 years ago

我还是会遇到这个error:call() takes 2 positional arguments but 3 were given

好久没看了,等一个大佬解答。🙃