I encountered a strange problem as I was trying to add pre-trained InceptionResNetV2 as my conv_base. Concretely, when I did
import tensorflow as tf
from keras import models
from keras import layers
from keras.applications import inception_resnet_v2
with tf.device('/cpu:0'):
conv_base = inception_resnet_v2.InceptionResNetV2(weights='imagenet', include_top=False, input_shape=some_shape)
model = models.Sequential()
model.add(layers.GlobalAveragePooling2D())
model.add(layers.Dense(num_classes, activation='softmax'))
print(model.summary())
It went stuck and took forever. But when I did
with tf.device('/cpu:0'):
conv_base = inception_resnet_v2.InceptionResNetV2(weights='imagenet', include_top=False, input_shape=some_shape)
print(conv_base.summary())
It took a few seconds and everything's fine. I'm on TF==1.4.0 and Keras==2.0.9 and I made sure both the CPU and GPU were idle when I was doing this. Has anyone encountered the same problem?
Hello everyone
I encountered a strange problem as I was trying to add pre-trained InceptionResNetV2 as my conv_base. Concretely, when I did
It went stuck and took forever. But when I did
It took a few seconds and everything's fine. I'm on TF==1.4.0 and Keras==2.0.9 and I made sure both the CPU and GPU were idle when I was doing this. Has anyone encountered the same problem?
@fchollet Father of Keras, please help!