元素初始化时,
sess.run(tf.initialize_all_variables()) 会报 module 'tensorflow' has no attribute 'initialize_all_variables'
按网上博客中说的改成global_variables_initializer后,还是会报 module 'tensorflow' has no attribute 'global_variables_initializer'
按网上另一位博主的思路,让版本一致,于是把代码改成了tf.compat.v1.global_variables_initializer() 就可以运行了