Skip to content

Commit

Permalink
Some changes
Browse files Browse the repository at this point in the history
  • Loading branch information
miquelmarti committed May 25, 2016
1 parent 885116d commit cd2cd92
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Binary file modified loss-categorical_crossentropy-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 7 additions & 7 deletions tiny_imagenet_classifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,24 +108,24 @@


datagen = ImageDataGenerator(
featurewise_center=False, # set input mean to 0 over the dataset
featurewise_center=True, # set input mean to 0 over the dataset
samplewise_center=False, # set each sample mean to 0
featurewise_std_normalization=False, # divide inputs by std of the dataset
featurewise_std_normalization=True, # divide inputs by std of the dataset
samplewise_std_normalization=False, # divide each input by its std
zca_whitening=True, # apply ZCA whitening
rotation_range=20, # randomly rotate images in the range (degrees, 0 to 180)
zca_whitening=False, # apply ZCA whitening
rotation_range=0., # randomly rotate images in the range (degrees, 0 to 180)
width_shift_range=0.1, # randomly shift images horizontally (fraction of total width)
height_shift_range=0.1, # randomly shift images vertically (fraction of total height)
horizontal_flip=True, # randomly flip images
vertical_flip=True) # randomly flip images
vertical_flip=False) # randomly flip images


fpath = 'loss-' + loss_function + '-' + str(num_classes)
datagen.fit(X_train)

df=datagen.flow(X_train, Y_train, batch_size=batch_size, shuffle=True)
# df=datagen.flow(X_train, Y_train, batch_size=batch_size, shuffle=True)

model.fit_generator(df,
model.fit_generator(datagen.flow(X_train, Y_train, batch_size=batch_size, shuffle=True),
samples_per_epoch=num_samples, nb_epoch=nb_epoch,
verbose=1, validation_data=(X_test,Y_test), #df,nb_val_samples=len(X_train)-num_samples,
callbacks=[Plotter(show_regressions=False, save_to_filepath=fpath, show_plot_window=False)])
Expand Down

0 comments on commit cd2cd92

Please sign in to comment.