xxxxxxxxxx
# a check point callback to save our best weights
checkpoint = ModelCheckpoint('dog_breed_classifier_model.h5',
monitor='val_acc',
verbose=1,
save_best_only=True,
mode='max',
save_weights_only=True)
# a reducing lr callback to reduce lr when val_loss doesn't increase
reduce_lr = ReduceLROnPlateau(monitor='val_loss', factor=0.2,
patience=1, verbose=1, mode='min',
min_delta=0.0001, cooldown=2, min_lr=1e-7)
# for early stop
early_stop = EarlyStopping(monitor="val_loss", mode="min", patience=5)
xxxxxxxxxx
$ curl https://api.github.com?callback=foo
> /**/foo({
> "meta": {
> "status": 200,
> "X-RateLimit-Limit": "5000",
> "X-RateLimit-Remaining": "4966",
> "X-RateLimit-Reset": "1372700873",
> "Link": [ // pagination headers and other links
> ["https://api.github.com?page=2", {"rel": "next"}]
> ]
> },
> "data": {
> // the data
> }
> })
xxxxxxxxxx
<html>
<head>
<script type="text/javascript">
function foo(response) {
var meta = response.meta;
var data = response.data;
console.log(meta);
console.log(data);
}
var script = document.createElement('script');
script.src = 'https://api.github.com?callback=foo';
document.getElementsByTagName('head')[0].appendChild(script);
</script>
</head>
<body>
<p>Open up your browser's console.</p>
</body>
</html>