tf1报错:
Errors may have originated from an input operation.
Input Source operations connected to node depth_estimation/depth_net/preprocessing/r1/skipLayer/skipLayer_conv/Conv2D:
depth_estimation/depth_net/preprocessing/256to128/bn_relu/Relu (defined at ./.././network/hourglass.py:92)
depth_estimation/depth_net/preprocessing/r1/skipLayer/skipLayer_conv/W/read (defined at ./.././network/hourglass.py:83)
Input Source operations connected to node depth_estimation/depth_net/preprocessing/r1/skipLayer/skipLayer_conv/Conv2D:
depth_estimation/depth_net/preprocessing/256to128/bn_relu/Relu (defined at ./.././network/hourglass.py:92)
depth_estimation/depth_net/preprocessing/r1/skipLayer/skipLayer_conv/W/read (defined at ./.././network/hourglass.py:83)
解决:
- gpustat看下进程,可能是上个session没有关闭。kill掉卡上所有进程
- 在import语句后放这一段:
config = tf.compat.v1.ConfigProto()
config.gpu_options.allow_growth = True
sess = tf.compat.v1.Session(config=config)