Improve Otto example
This commit is contained in:
parent
3613ce4b3e
commit
b763f8964f
@ -31,6 +31,8 @@ from sklearn.preprocessing import StandardScaler
|
|||||||
- with smaller layers, largers layers
|
- with smaller layers, largers layers
|
||||||
- with more layers, less layers
|
- with more layers, less layers
|
||||||
- with different optimizers (SGD+momentum+decay is probably better than Adam!)
|
- with different optimizers (SGD+momentum+decay is probably better than Adam!)
|
||||||
|
|
||||||
|
Get the data from Kaggle: https://www.kaggle.com/c/otto-group-product-classification-challenge/data
|
||||||
'''
|
'''
|
||||||
|
|
||||||
np.random.seed(1337) # for reproducibility
|
np.random.seed(1337) # for reproducibility
|
||||||
@ -113,7 +115,7 @@ model.compile(loss='categorical_crossentropy', optimizer="adam")
|
|||||||
|
|
||||||
print("Training model...")
|
print("Training model...")
|
||||||
|
|
||||||
model.fit(X, y, nb_epoch=20, batch_size=16, validation_split=0.15)
|
model.fit(X, y, nb_epoch=20, batch_size=128, validation_split=0.15)
|
||||||
|
|
||||||
print("Generating submission...")
|
print("Generating submission...")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user