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
| from keras.callbacks import Callback | |
| import keras.backend as K | |
| import numpy as np | |
| class SGDRScheduler(Callback): | |
| '''Cosine annealing learning rate scheduler with periodic restarts. | |
| # Usage | |
| ```python | |
| schedule = SGDRScheduler(min_lr=1e-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
| % From http://phaseportrait.blogspot.com/2008/06/sinc-interpolation-in-matlab.html | |
| % Ideally "resamples" x vector from s to u by sinc interpolation | |
| function y = sinc_interp(x,s,u) | |
| % Interpolates x sampled sampled at "s" instants | |
| % Output y is sampled at "u" instants ("u" for "upsampled") | |
| % (EXPECTS x, s, and u to be ROW VECTORS!!) | |
| % Find the period of the undersampled signal | |
| T = s(2)-s(1); |