def plot_loss_against_lr(loss, wnd_size=6000):
    fig = plt.figure(figsize=(11.69, 8.27))
    ax1 = fig.add_subplot(111)
    ax1.set_xlabel('time')
    ax1.set_ylabel('loss', color='b')
    ax1.plot(loss.loss.rolling(wnd_size).mean(), color='b')
    ax2 = ax1.twinx()
    ax2.set_ylabel('learning rate', color='r')
    ax2.plot(loss.lr.rolling(wnd_size).mean(), 'r')
def plot_loss_against_lr(loss, wnd_size=6000):
    fig = plt.figure(figsize=(11.69, 8.27))
    ax1 = fig.add_subplot(111)
    ax1.set_xlabel('time')
    ax1.set_ylabel('loss', color='b')
    ax1.plot(loss.loss.rolling(wnd_size).mean(), color='b')
    ax2 = ax1.twinx()
    ax2.set_ylabel('learning rate', color='r')
    ax2.plot(loss.lr.rolling(wnd_size).mean(), 'r')