Traceback (most recent call last):
File "C:/Users/w/Desktop/emotion_classification/video_test.py", line 13, in <module>
train_mode = tf.placeholder(tf.bool)
AttributeError: module 'tensorflow' has no attribute 'placeholder'
错误情况:应该是版本之间不兼容
解决方案:
源代码中:
import tensorflow as tf
更改为:
import tensorflow.compat.v1 as tf
tf.disable_v2_behavior()
目前测试有效