We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The idea is to see whether training a new NN on top of existing features (or even the original image) works for the regression problem.
E.g. for resnet50
import numpy as np from keras.applications import ResNet50 from keras.layers import Dense, Flatten, Dropout, Input from keras.models import Model def custom_fc(): inputs = Input(shape=(1,1,2048)) x = Flatten()(inputs) x = Dropout(0.5, seed=1234)(x) x = Dense(256, activation='relu')(x) x = Dropout(0.1, seed=1234)(x) x = Dense(32, activation='relu')(x) outputs = Dense(1, activation='linear')(x) return Model(inputs=inputs, outputs=outputs) r50 = ResNet50(weights='imagenet',include_top=False,input_shape=(224,224,3)) x_train = np.random.random((10, 224, 224,3)) y_train = 100*np.random.random((10, 1)) x_train_r50 = r50.predict(x_train) print x_train_r50.shape model = custom_fc() model.compile(optimizer='rmsprop', loss='mse') model.fit(x_train_r50, y_train, epochs=100, batch_size=1) y_pred = model.predict(x_train_r50) print y_train print '*'*30 print y_pred
Also try binning target variable.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The idea is to see whether training a new NN on top of existing features (or even the original image) works for the regression problem.
E.g. for resnet50
Also try binning target variable.
The text was updated successfully, but these errors were encountered: