Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class myCallback(tf.keras.callbacks.Callback): | |
def on_epoch_end(self, epoch, logs={}): | |
if logs.get('accuracy') is not None and logs.get('val_accuracy') > 0.85: | |
print("\nReached 85% validation accuracy so cancelling training!") | |
self.model.stop_training = True | |
callback = myCallback() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Plot the training and validation accuracies for each epoch | |
acc = history.history['accuracy'] | |
val_acc = history.history['val_accuracy'] | |
loss = history.history['loss'] | |
val_loss = history.history['val_loss'] | |
epochs = range(len(acc)) | |
fig = plt.figure(figsize = (15,5)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
evaluation = pd.DataFrame(model.history.history) | |
evaluation[['accuracy', 'val_accuracy']].plot() | |
evaluation[['loss', 'val_loss']].plot() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Controllers\API; | |
class ResponseFormatter | |
{ | |
protected static $response = [ | |
'meta' => [ | |
'code' => 200, | |
'status' => 'success', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import matplotlib.pyplot as plt | |
plt.rcParams.update({ | |
"lines.color": "white", | |
"patch.edgecolor": "white", | |
"text.color": "white", | |
"axes.facecolor": "black", | |
"axes.edgecolor": "white", | |
"axes.labelcolor": "white", | |
"xtick.color": "white", |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import matplotlib.pyplot as plt | |
# Plot utility | |
def plot_graphs(history, string): | |
plt.plot(history.history[string]) | |
plt.plot(history.history['val_'+string]) | |
plt.xlabel("Epochs") | |
plt.ylabel(string) | |
plt.legend([string, 'val_'+string]) | |
plt.show() |
NewerOlder