I was trying to retrain Inception-V4 with an image set to unsupervised learning. First, I have read the pre-trained weights file for the Inception-V4.
out = Dense(output_dim=nb_classes, activation='softmax')(x)
model = Model(init, out, name='Inception-v4')
if load_weights == True:
weights = checkpoint_custom_path
model.load_weights(weights, by_name=True)
print("Model weights loaded.")
return model
And I removed final full connection layer and dense layer to make the feature extractor. Next, i added a new convolution layer to get special dimension feature vector form model. And I saved a model and read again.
model = create_inception_v4(load_weights=check)
model.summary()
model.layers.pop()
model.layers.pop()
model.summary()
x = conv_block(model.layers[-1].output, 512, 1, 1)
x = Flatten()(x)
out = Dense(output_dim=500, activation='softmax')(x)
out = Activation('sigmoid', name='loss')(out)
model2 = Model(input=model.input, output=[out])
model2.summary()
model2.save(checkpoint_custom_path)
model = create_custormized_inception_v4(nb_classes=500, load_weights=check_custom)
model.summary()
The problem is to retrain this model with my image data set. But I don't know the label for each images. So, I have to retrain the model by unsupervised learning. The size of image data set is over 130K. How can I do retrain the model by unsupervised learning?