采用InceptionV3来微调自己的数据
一.GPU问题
Cannot assign a device for operation 'InceptionV3/AuxLogits/Conv2d_2b_1x1/weights/RMSProp1': Could not satisfy explicit device specification '/device:GPU:0' because no supported kernel for GPU devices is available.
翻了一些资料,可能是定义在图中的op只能在CPU中运行,GPU不支持
解决方法:
1.将以下参数由False设置为True,但是这样的话,整个程序都在CPU上运行,会很慢。所以可以用第二种方式
2.设置tf.ConfigProto
config = tf.ConfigProto(allow_soft_placement = True)
sess = tf.Session(config = config)
这种方式适合在session中,如果是slim里,由于本身将session封装好了,不需要创建,所以用