Ubuntu找这个目录文件
anaconda3/envs/yourEnv/lib/python3.7/site-packages/tensorflow_core/python/keras/utils/vis_utils.py
Windows找这个目录文件
Anaconda\envs\yourEnv\Lib\site-packages\tensorflow\python\keras\utils\vis_utils.py
问题出在vis_utils.py文件中下面这个函数上面
def format_shape(shape):
return str(shape).replace(str(None), '?')
直接改为:
def format_shape(shape):
return str(shape).replace(str(None), 'None')