Nixtla / neuralforecast

Scalable and user friendly neural :brain: forecasting algorithms.
https://nixtlaverse.nixtla.io/neuralforecast
Apache License 2.0
3.07k stars 355 forks source link

Advice on Porting NBEATS, NBEATSx, and NHITS to R. tuple/float error when creating models object #655

Closed frankiethull closed 1 year ago

frankiethull commented 1 year ago

Description

nixtlaR test

fth

Porting over NBEATS, NBEATSx, and NHITS to R

first, running the python example from here: https://pypi.org/project/neuralforecast/

import numpy as np
import pandas as pd
# from IPython.display import display, Markdown

# import matplotlib.pyplot as plt
from neuralforecast import NeuralForecast
from neuralforecast.models import NBEATS, NHITS
from neuralforecast.utils import AirPassengersDF

# Split data and declare panel dataset
Y_df = AirPassengersDF
Y_train_df = Y_df[Y_df.ds<='1959-12-31'] # 132 train
Y_test_df = Y_df[Y_df.ds>'1959-12-31'] # 12 test

# Fit and predict with NBEATS and NHITS models
horizon = len(Y_test_df)
models = [NBEATS(input_size=2 * horizon, h=horizon, max_epochs=50),
          NHITS(input_size=2 * horizon, h=horizon, max_epochs=50)]
Global seed set to 1
Global seed set to 1
nf = NeuralForecast(models=models, freq='M')
nf.fit(df=Y_train_df)
Sanity Checking: 0it [00:00, ?it/s]
Sanity Checking:   0%|          | 0/1 [00:00<?, ?it/s]
Sanity Checking DataLoader 0:   0%|          | 0/1 [00:00<?, ?it/s]
Sanity Checking DataLoader 0: 100%|##########| 1/1 [00:00<?, ?it/s]

Training: 0it [00:00, ?it/s]
Training:   0%|          | 0/1 [00:00<?, ?it/s]
Epoch 0:   0%|          | 0/1 [00:00<?, ?it/s] 
Epoch 0: 100%|##########| 1/1 [00:00<00:00,  3.34it/s]
Epoch 0: 100%|##########| 1/1 [00:00<00:00,  3.34it/s, v_num=13, train_loss_step=46.80]
Epoch 0: 100%|##########| 1/1 [00:00<00:00,  3.33it/s, v_num=13, train_loss_step=46.80, train_loss_epoch=46.80]
Epoch 0:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=46.80, train_loss_epoch=46.80]        
Epoch 1:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=46.80, train_loss_epoch=46.80]
Epoch 1: 100%|##########| 1/1 [00:00<00:00,  4.03it/s, v_num=13, train_loss_step=46.80, train_loss_epoch=46.80]
Epoch 1: 100%|##########| 1/1 [00:00<00:00,  4.03it/s, v_num=13, train_loss_step=177.0, train_loss_epoch=46.80]
Epoch 1: 100%|##########| 1/1 [00:00<00:00,  4.03it/s, v_num=13, train_loss_step=177.0, train_loss_epoch=177.0]
Epoch 1:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=177.0, train_loss_epoch=177.0]        
Epoch 2:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=177.0, train_loss_epoch=177.0]
Epoch 2: 100%|##########| 1/1 [00:00<00:00,  3.58it/s, v_num=13, train_loss_step=177.0, train_loss_epoch=177.0]
Epoch 2: 100%|##########| 1/1 [00:00<00:00,  3.58it/s, v_num=13, train_loss_step=55.30, train_loss_epoch=177.0]
Epoch 2: 100%|##########| 1/1 [00:00<00:00,  3.58it/s, v_num=13, train_loss_step=55.30, train_loss_epoch=55.30]
Epoch 2:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=55.30, train_loss_epoch=55.30]        
Epoch 3:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=55.30, train_loss_epoch=55.30]
Epoch 3: 100%|##########| 1/1 [00:00<00:00,  4.01it/s, v_num=13, train_loss_step=55.30, train_loss_epoch=55.30]
Epoch 3: 100%|##########| 1/1 [00:00<00:00,  4.01it/s, v_num=13, train_loss_step=68.10, train_loss_epoch=55.30]
Epoch 3: 100%|##########| 1/1 [00:00<00:00,  4.01it/s, v_num=13, train_loss_step=68.10, train_loss_epoch=68.10]
Epoch 3:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=68.10, train_loss_epoch=68.10]        
Epoch 4:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=68.10, train_loss_epoch=68.10]
Epoch 4: 100%|##########| 1/1 [00:00<00:00,  3.92it/s, v_num=13, train_loss_step=68.10, train_loss_epoch=68.10]
Epoch 4: 100%|##########| 1/1 [00:00<00:00,  3.90it/s, v_num=13, train_loss_step=48.20, train_loss_epoch=68.10]
Epoch 4: 100%|##########| 1/1 [00:00<00:00,  3.90it/s, v_num=13, train_loss_step=48.20, train_loss_epoch=48.20]
Epoch 4:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=48.20, train_loss_epoch=48.20]        
Epoch 5:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=48.20, train_loss_epoch=48.20]
Epoch 5: 100%|##########| 1/1 [00:00<00:00,  3.63it/s, v_num=13, train_loss_step=48.20, train_loss_epoch=48.20]
Epoch 5: 100%|##########| 1/1 [00:00<00:00,  3.63it/s, v_num=13, train_loss_step=42.90, train_loss_epoch=48.20]
Epoch 5: 100%|##########| 1/1 [00:00<00:00,  3.63it/s, v_num=13, train_loss_step=42.90, train_loss_epoch=42.90]
Epoch 5:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=42.90, train_loss_epoch=42.90]        
Epoch 6:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=42.90, train_loss_epoch=42.90]
Epoch 6: 100%|##########| 1/1 [00:00<00:00,  3.76it/s, v_num=13, train_loss_step=42.90, train_loss_epoch=42.90]
Epoch 6: 100%|##########| 1/1 [00:00<00:00,  3.75it/s, v_num=13, train_loss_step=46.50, train_loss_epoch=42.90]
Epoch 6: 100%|##########| 1/1 [00:00<00:00,  3.74it/s, v_num=13, train_loss_step=46.50, train_loss_epoch=46.50]
Epoch 6:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=46.50, train_loss_epoch=46.50]        
Epoch 7:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=46.50, train_loss_epoch=46.50]
Epoch 7: 100%|##########| 1/1 [00:00<00:00,  3.70it/s, v_num=13, train_loss_step=46.50, train_loss_epoch=46.50]
Epoch 7: 100%|##########| 1/1 [00:00<00:00,  3.70it/s, v_num=13, train_loss_step=43.20, train_loss_epoch=46.50]
Epoch 7: 100%|##########| 1/1 [00:00<00:00,  3.70it/s, v_num=13, train_loss_step=43.20, train_loss_epoch=43.20]
Epoch 7:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=43.20, train_loss_epoch=43.20]        
Epoch 8:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=43.20, train_loss_epoch=43.20]
Epoch 8: 100%|##########| 1/1 [00:00<00:00,  3.20it/s, v_num=13, train_loss_step=43.20, train_loss_epoch=43.20]
Epoch 8: 100%|##########| 1/1 [00:00<00:00,  3.20it/s, v_num=13, train_loss_step=41.30, train_loss_epoch=43.20]
Epoch 8: 100%|##########| 1/1 [00:00<00:00,  3.20it/s, v_num=13, train_loss_step=41.30, train_loss_epoch=41.30]
Epoch 8:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=41.30, train_loss_epoch=41.30]        
Epoch 9:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=41.30, train_loss_epoch=41.30]
Epoch 9: 100%|##########| 1/1 [00:00<00:00,  3.63it/s, v_num=13, train_loss_step=41.30, train_loss_epoch=41.30]
Epoch 9: 100%|##########| 1/1 [00:00<00:00,  3.63it/s, v_num=13, train_loss_step=41.00, train_loss_epoch=41.30]
Epoch 9: 100%|##########| 1/1 [00:00<00:00,  3.63it/s, v_num=13, train_loss_step=41.00, train_loss_epoch=41.00]
Epoch 9:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=41.00, train_loss_epoch=41.00]        
Epoch 10:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=41.00, train_loss_epoch=41.00]
Epoch 10: 100%|##########| 1/1 [00:00<00:00,  3.55it/s, v_num=13, train_loss_step=41.00, train_loss_epoch=41.00]
Epoch 10: 100%|##########| 1/1 [00:00<00:00,  3.55it/s, v_num=13, train_loss_step=39.80, train_loss_epoch=41.00]
Epoch 10: 100%|##########| 1/1 [00:00<00:00,  3.55it/s, v_num=13, train_loss_step=39.80, train_loss_epoch=39.80]
Epoch 10:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=39.80, train_loss_epoch=39.80]        
Epoch 11:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=39.80, train_loss_epoch=39.80]
Epoch 11: 100%|##########| 1/1 [00:00<00:00,  3.77it/s, v_num=13, train_loss_step=39.80, train_loss_epoch=39.80]
Epoch 11: 100%|##########| 1/1 [00:00<00:00,  3.77it/s, v_num=13, train_loss_step=39.60, train_loss_epoch=39.80]
Epoch 11: 100%|##########| 1/1 [00:00<00:00,  3.77it/s, v_num=13, train_loss_step=39.60, train_loss_epoch=39.60]
Epoch 11:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=39.60, train_loss_epoch=39.60]        
Epoch 12:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=39.60, train_loss_epoch=39.60]
Epoch 12: 100%|##########| 1/1 [00:00<00:00,  3.78it/s, v_num=13, train_loss_step=39.60, train_loss_epoch=39.60]
Epoch 12: 100%|##########| 1/1 [00:00<00:00,  3.78it/s, v_num=13, train_loss_step=37.20, train_loss_epoch=39.60]
Epoch 12: 100%|##########| 1/1 [00:00<00:00,  3.78it/s, v_num=13, train_loss_step=37.20, train_loss_epoch=37.20]
Epoch 12:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=37.20, train_loss_epoch=37.20]        
Epoch 13:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=37.20, train_loss_epoch=37.20]
Epoch 13: 100%|##########| 1/1 [00:00<00:00,  3.56it/s, v_num=13, train_loss_step=37.20, train_loss_epoch=37.20]
Epoch 13: 100%|##########| 1/1 [00:00<00:00,  3.56it/s, v_num=13, train_loss_step=36.70, train_loss_epoch=37.20]
Epoch 13: 100%|##########| 1/1 [00:00<00:00,  3.56it/s, v_num=13, train_loss_step=36.70, train_loss_epoch=36.70]
Epoch 13:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=36.70, train_loss_epoch=36.70]        
Epoch 14:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=36.70, train_loss_epoch=36.70]
Epoch 14: 100%|##########| 1/1 [00:00<00:00,  3.40it/s, v_num=13, train_loss_step=36.70, train_loss_epoch=36.70]
Epoch 14: 100%|##########| 1/1 [00:00<00:00,  3.39it/s, v_num=13, train_loss_step=33.60, train_loss_epoch=36.70]
Epoch 14: 100%|##########| 1/1 [00:00<00:00,  3.39it/s, v_num=13, train_loss_step=33.60, train_loss_epoch=33.60]
Epoch 14:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=33.60, train_loss_epoch=33.60]        
Epoch 15:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=33.60, train_loss_epoch=33.60]
Epoch 15: 100%|##########| 1/1 [00:00<00:00,  4.23it/s, v_num=13, train_loss_step=33.60, train_loss_epoch=33.60]
Epoch 15: 100%|##########| 1/1 [00:00<00:00,  4.23it/s, v_num=13, train_loss_step=32.10, train_loss_epoch=33.60]
Epoch 15: 100%|##########| 1/1 [00:00<00:00,  4.23it/s, v_num=13, train_loss_step=32.10, train_loss_epoch=32.10]
Epoch 15:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=32.10, train_loss_epoch=32.10]        
Epoch 16:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=32.10, train_loss_epoch=32.10]
Epoch 16: 100%|##########| 1/1 [00:00<00:00,  3.58it/s, v_num=13, train_loss_step=32.10, train_loss_epoch=32.10]
Epoch 16: 100%|##########| 1/1 [00:00<00:00,  3.58it/s, v_num=13, train_loss_step=29.80, train_loss_epoch=32.10]
Epoch 16: 100%|##########| 1/1 [00:00<00:00,  3.58it/s, v_num=13, train_loss_step=29.80, train_loss_epoch=29.80]
Epoch 16:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=29.80, train_loss_epoch=29.80]        
Epoch 17:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=29.80, train_loss_epoch=29.80]
Epoch 17: 100%|##########| 1/1 [00:00<00:00,  3.49it/s, v_num=13, train_loss_step=29.80, train_loss_epoch=29.80]
Epoch 17: 100%|##########| 1/1 [00:00<00:00,  3.49it/s, v_num=13, train_loss_step=27.30, train_loss_epoch=29.80]
Epoch 17: 100%|##########| 1/1 [00:00<00:00,  3.49it/s, v_num=13, train_loss_step=27.30, train_loss_epoch=27.30]
Epoch 17:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=27.30, train_loss_epoch=27.30]        
Epoch 18:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=27.30, train_loss_epoch=27.30]
Epoch 18: 100%|##########| 1/1 [00:00<00:00,  3.77it/s, v_num=13, train_loss_step=27.30, train_loss_epoch=27.30]
Epoch 18: 100%|##########| 1/1 [00:00<00:00,  3.77it/s, v_num=13, train_loss_step=24.90, train_loss_epoch=27.30]
Epoch 18: 100%|##########| 1/1 [00:00<00:00,  3.77it/s, v_num=13, train_loss_step=24.90, train_loss_epoch=24.90]
Epoch 18:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=24.90, train_loss_epoch=24.90]        
Epoch 19:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=24.90, train_loss_epoch=24.90]
Epoch 19: 100%|##########| 1/1 [00:00<00:00,  3.54it/s, v_num=13, train_loss_step=24.90, train_loss_epoch=24.90]
Epoch 19: 100%|##########| 1/1 [00:00<00:00,  3.54it/s, v_num=13, train_loss_step=23.60, train_loss_epoch=24.90]
Epoch 19: 100%|##########| 1/1 [00:00<00:00,  3.54it/s, v_num=13, train_loss_step=23.60, train_loss_epoch=23.60]
Epoch 19:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=23.60, train_loss_epoch=23.60]        
Epoch 20:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=23.60, train_loss_epoch=23.60]
Epoch 20: 100%|##########| 1/1 [00:00<00:00,  3.27it/s, v_num=13, train_loss_step=23.60, train_loss_epoch=23.60]
Epoch 20: 100%|##########| 1/1 [00:00<00:00,  3.26it/s, v_num=13, train_loss_step=23.00, train_loss_epoch=23.60]
Epoch 20: 100%|##########| 1/1 [00:00<00:00,  3.26it/s, v_num=13, train_loss_step=23.00, train_loss_epoch=23.00]
Epoch 20:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=23.00, train_loss_epoch=23.00]        
Epoch 21:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=23.00, train_loss_epoch=23.00]
Epoch 21: 100%|##########| 1/1 [00:00<00:00,  3.92it/s, v_num=13, train_loss_step=23.00, train_loss_epoch=23.00]
Epoch 21: 100%|##########| 1/1 [00:00<00:00,  3.92it/s, v_num=13, train_loss_step=24.40, train_loss_epoch=23.00]
Epoch 21: 100%|##########| 1/1 [00:00<00:00,  3.91it/s, v_num=13, train_loss_step=24.40, train_loss_epoch=24.40]
Epoch 21:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=24.40, train_loss_epoch=24.40]        
Epoch 22:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=24.40, train_loss_epoch=24.40]
Epoch 22: 100%|##########| 1/1 [00:00<00:00,  3.81it/s, v_num=13, train_loss_step=24.40, train_loss_epoch=24.40]
Epoch 22: 100%|##########| 1/1 [00:00<00:00,  3.81it/s, v_num=13, train_loss_step=23.30, train_loss_epoch=24.40]
Epoch 22: 100%|##########| 1/1 [00:00<00:00,  3.81it/s, v_num=13, train_loss_step=23.30, train_loss_epoch=23.30]
Epoch 22:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=23.30, train_loss_epoch=23.30]        
Epoch 23:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=23.30, train_loss_epoch=23.30]
Epoch 23: 100%|##########| 1/1 [00:00<00:00,  3.76it/s, v_num=13, train_loss_step=23.30, train_loss_epoch=23.30]
Epoch 23: 100%|##########| 1/1 [00:00<00:00,  3.76it/s, v_num=13, train_loss_step=20.50, train_loss_epoch=23.30]
Epoch 23: 100%|##########| 1/1 [00:00<00:00,  3.76it/s, v_num=13, train_loss_step=20.50, train_loss_epoch=20.50]
Epoch 23:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=20.50, train_loss_epoch=20.50]        
Epoch 24:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=20.50, train_loss_epoch=20.50]
Epoch 24: 100%|##########| 1/1 [00:00<00:00,  4.03it/s, v_num=13, train_loss_step=20.50, train_loss_epoch=20.50]
Epoch 24: 100%|##########| 1/1 [00:00<00:00,  4.03it/s, v_num=13, train_loss_step=20.10, train_loss_epoch=20.50]
Epoch 24: 100%|##########| 1/1 [00:00<00:00,  4.03it/s, v_num=13, train_loss_step=20.10, train_loss_epoch=20.10]
Epoch 24:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=20.10, train_loss_epoch=20.10]        
Epoch 25:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=20.10, train_loss_epoch=20.10]
Epoch 25: 100%|##########| 1/1 [00:00<00:00,  3.72it/s, v_num=13, train_loss_step=20.10, train_loss_epoch=20.10]
Epoch 25: 100%|##########| 1/1 [00:00<00:00,  3.72it/s, v_num=13, train_loss_step=19.80, train_loss_epoch=20.10]
Epoch 25: 100%|##########| 1/1 [00:00<00:00,  3.72it/s, v_num=13, train_loss_step=19.80, train_loss_epoch=19.80]
Epoch 25:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=19.80, train_loss_epoch=19.80]        
Epoch 26:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=19.80, train_loss_epoch=19.80]
Epoch 26: 100%|##########| 1/1 [00:00<00:00,  3.34it/s, v_num=13, train_loss_step=19.80, train_loss_epoch=19.80]
Epoch 26: 100%|##########| 1/1 [00:00<00:00,  3.34it/s, v_num=13, train_loss_step=19.70, train_loss_epoch=19.80]
Epoch 26: 100%|##########| 1/1 [00:00<00:00,  3.34it/s, v_num=13, train_loss_step=19.70, train_loss_epoch=19.70]
Epoch 26:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=19.70, train_loss_epoch=19.70]        
Epoch 27:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=19.70, train_loss_epoch=19.70]
Epoch 27: 100%|##########| 1/1 [00:00<00:00,  3.91it/s, v_num=13, train_loss_step=19.70, train_loss_epoch=19.70]
Epoch 27: 100%|##########| 1/1 [00:00<00:00,  3.91it/s, v_num=13, train_loss_step=17.90, train_loss_epoch=19.70]
Epoch 27: 100%|##########| 1/1 [00:00<00:00,  3.91it/s, v_num=13, train_loss_step=17.90, train_loss_epoch=17.90]
Epoch 27:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=17.90, train_loss_epoch=17.90]        
Epoch 28:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=17.90, train_loss_epoch=17.90]
Epoch 28: 100%|##########| 1/1 [00:00<00:00,  3.56it/s, v_num=13, train_loss_step=17.90, train_loss_epoch=17.90]
Epoch 28: 100%|##########| 1/1 [00:00<00:00,  3.56it/s, v_num=13, train_loss_step=17.00, train_loss_epoch=17.90]
Epoch 28: 100%|##########| 1/1 [00:00<00:00,  3.56it/s, v_num=13, train_loss_step=17.00, train_loss_epoch=17.00]
Epoch 28:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=17.00, train_loss_epoch=17.00]        
Epoch 29:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=17.00, train_loss_epoch=17.00]
Epoch 29: 100%|##########| 1/1 [00:00<00:00,  3.74it/s, v_num=13, train_loss_step=17.00, train_loss_epoch=17.00]
Epoch 29: 100%|##########| 1/1 [00:00<00:00,  3.74it/s, v_num=13, train_loss_step=17.60, train_loss_epoch=17.00]
Epoch 29: 100%|##########| 1/1 [00:00<00:00,  3.73it/s, v_num=13, train_loss_step=17.60, train_loss_epoch=17.60]
Epoch 29:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=17.60, train_loss_epoch=17.60]        
Epoch 30:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=17.60, train_loss_epoch=17.60]
Epoch 30: 100%|##########| 1/1 [00:00<00:00,  4.00it/s, v_num=13, train_loss_step=17.60, train_loss_epoch=17.60]
Epoch 30: 100%|##########| 1/1 [00:00<00:00,  4.00it/s, v_num=13, train_loss_step=17.30, train_loss_epoch=17.60]
Epoch 30: 100%|##########| 1/1 [00:00<00:00,  4.00it/s, v_num=13, train_loss_step=17.30, train_loss_epoch=17.30]
Epoch 30:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=17.30, train_loss_epoch=17.30]        
Epoch 31:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=17.30, train_loss_epoch=17.30]
Epoch 31: 100%|##########| 1/1 [00:00<00:00,  3.33it/s, v_num=13, train_loss_step=17.30, train_loss_epoch=17.30]
Epoch 31: 100%|##########| 1/1 [00:00<00:00,  3.33it/s, v_num=13, train_loss_step=14.70, train_loss_epoch=17.30]
Epoch 31: 100%|##########| 1/1 [00:00<00:00,  3.33it/s, v_num=13, train_loss_step=14.70, train_loss_epoch=14.70]
Epoch 31:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=14.70, train_loss_epoch=14.70]        
Epoch 32:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=14.70, train_loss_epoch=14.70]
Epoch 32: 100%|##########| 1/1 [00:00<00:00,  3.15it/s, v_num=13, train_loss_step=14.70, train_loss_epoch=14.70]
Epoch 32: 100%|##########| 1/1 [00:00<00:00,  3.15it/s, v_num=13, train_loss_step=14.30, train_loss_epoch=14.70]
Epoch 32: 100%|##########| 1/1 [00:00<00:00,  3.15it/s, v_num=13, train_loss_step=14.30, train_loss_epoch=14.30]
Epoch 32:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=14.30, train_loss_epoch=14.30]        
Epoch 33:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=14.30, train_loss_epoch=14.30]
Epoch 33: 100%|##########| 1/1 [00:00<00:00,  4.41it/s, v_num=13, train_loss_step=14.30, train_loss_epoch=14.30]
Epoch 33: 100%|##########| 1/1 [00:00<00:00,  4.12it/s, v_num=13, train_loss_step=14.60, train_loss_epoch=14.30]
Epoch 33: 100%|##########| 1/1 [00:00<00:00,  4.12it/s, v_num=13, train_loss_step=14.60, train_loss_epoch=14.60]
Epoch 33:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=14.60, train_loss_epoch=14.60]        
Epoch 34:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=14.60, train_loss_epoch=14.60]
Epoch 34: 100%|##########| 1/1 [00:00<00:00,  4.27it/s, v_num=13, train_loss_step=14.60, train_loss_epoch=14.60]
Epoch 34: 100%|##########| 1/1 [00:00<00:00,  4.00it/s, v_num=13, train_loss_step=14.00, train_loss_epoch=14.60]
Epoch 34: 100%|##########| 1/1 [00:00<00:00,  4.00it/s, v_num=13, train_loss_step=14.00, train_loss_epoch=14.00]
Epoch 34:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=14.00, train_loss_epoch=14.00]        
Epoch 35:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=14.00, train_loss_epoch=14.00]
Epoch 35: 100%|##########| 1/1 [00:00<00:00,  3.72it/s, v_num=13, train_loss_step=14.00, train_loss_epoch=14.00]
Epoch 35: 100%|##########| 1/1 [00:00<00:00,  3.72it/s, v_num=13, train_loss_step=13.60, train_loss_epoch=14.00]
Epoch 35: 100%|##########| 1/1 [00:00<00:00,  3.72it/s, v_num=13, train_loss_step=13.60, train_loss_epoch=13.60]
Epoch 35:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=13.60, train_loss_epoch=13.60]        
Epoch 36:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=13.60, train_loss_epoch=13.60]
Epoch 36: 100%|##########| 1/1 [00:00<00:00,  3.77it/s, v_num=13, train_loss_step=13.60, train_loss_epoch=13.60]
Epoch 36: 100%|##########| 1/1 [00:00<00:00,  3.77it/s, v_num=13, train_loss_step=13.70, train_loss_epoch=13.60]
Epoch 36: 100%|##########| 1/1 [00:00<00:00,  3.77it/s, v_num=13, train_loss_step=13.70, train_loss_epoch=13.70]
Epoch 36:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=13.70, train_loss_epoch=13.70]        
Epoch 37:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=13.70, train_loss_epoch=13.70]
Epoch 37: 100%|##########| 1/1 [00:00<00:00,  3.96it/s, v_num=13, train_loss_step=13.70, train_loss_epoch=13.70]
Epoch 37: 100%|##########| 1/1 [00:00<00:00,  3.96it/s, v_num=13, train_loss_step=13.70, train_loss_epoch=13.70]
Epoch 37: 100%|##########| 1/1 [00:00<00:00,  3.96it/s, v_num=13, train_loss_step=13.70, train_loss_epoch=13.70]
Epoch 37:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=13.70, train_loss_epoch=13.70]        
Epoch 38:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=13.70, train_loss_epoch=13.70]
Epoch 38: 100%|##########| 1/1 [00:00<00:00,  3.40it/s, v_num=13, train_loss_step=13.70, train_loss_epoch=13.70]
Epoch 38: 100%|##########| 1/1 [00:00<00:00,  3.40it/s, v_num=13, train_loss_step=12.70, train_loss_epoch=13.70]
Epoch 38: 100%|##########| 1/1 [00:00<00:00,  3.40it/s, v_num=13, train_loss_step=12.70, train_loss_epoch=12.70]
Epoch 38:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=12.70, train_loss_epoch=12.70]        
Epoch 39:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=12.70, train_loss_epoch=12.70]
Epoch 39: 100%|##########| 1/1 [00:00<00:00,  4.27it/s, v_num=13, train_loss_step=12.70, train_loss_epoch=12.70]
Epoch 39: 100%|##########| 1/1 [00:00<00:00,  4.27it/s, v_num=13, train_loss_step=12.40, train_loss_epoch=12.70]
Epoch 39: 100%|##########| 1/1 [00:00<00:00,  4.27it/s, v_num=13, train_loss_step=12.40, train_loss_epoch=12.40]
Epoch 39:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=12.40, train_loss_epoch=12.40]        
Epoch 40:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=12.40, train_loss_epoch=12.40]
Epoch 40: 100%|##########| 1/1 [00:00<00:00,  3.59it/s, v_num=13, train_loss_step=12.40, train_loss_epoch=12.40]
Epoch 40: 100%|##########| 1/1 [00:00<00:00,  3.59it/s, v_num=13, train_loss_step=12.80, train_loss_epoch=12.40]
Epoch 40: 100%|##########| 1/1 [00:00<00:00,  3.59it/s, v_num=13, train_loss_step=12.80, train_loss_epoch=12.80]
Epoch 40:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=12.80, train_loss_epoch=12.80]        
Epoch 41:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=12.80, train_loss_epoch=12.80]
Epoch 41: 100%|##########| 1/1 [00:00<00:00,  3.37it/s, v_num=13, train_loss_step=12.80, train_loss_epoch=12.80]
Epoch 41: 100%|##########| 1/1 [00:00<00:00,  3.37it/s, v_num=13, train_loss_step=13.10, train_loss_epoch=12.80]
Epoch 41: 100%|##########| 1/1 [00:00<00:00,  3.37it/s, v_num=13, train_loss_step=13.10, train_loss_epoch=13.10]
Epoch 41:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=13.10, train_loss_epoch=13.10]        
Epoch 42:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=13.10, train_loss_epoch=13.10]
Epoch 42: 100%|##########| 1/1 [00:00<00:00,  3.37it/s, v_num=13, train_loss_step=13.10, train_loss_epoch=13.10]
Epoch 42: 100%|##########| 1/1 [00:00<00:00,  3.37it/s, v_num=13, train_loss_step=12.00, train_loss_epoch=13.10]
Epoch 42: 100%|##########| 1/1 [00:00<00:00,  3.37it/s, v_num=13, train_loss_step=12.00, train_loss_epoch=12.00]
Epoch 42:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=12.00, train_loss_epoch=12.00]        
Epoch 43:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=12.00, train_loss_epoch=12.00]
Epoch 43: 100%|##########| 1/1 [00:00<00:00,  3.57it/s, v_num=13, train_loss_step=12.00, train_loss_epoch=12.00]
Epoch 43: 100%|##########| 1/1 [00:00<00:00,  3.38it/s, v_num=13, train_loss_step=11.40, train_loss_epoch=12.00]
Epoch 43: 100%|##########| 1/1 [00:00<00:00,  3.38it/s, v_num=13, train_loss_step=11.40, train_loss_epoch=11.40]
Epoch 43:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=11.40, train_loss_epoch=11.40]        
Epoch 44:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=11.40, train_loss_epoch=11.40]
Epoch 44: 100%|##########| 1/1 [00:00<00:00,  2.89it/s, v_num=13, train_loss_step=11.40, train_loss_epoch=11.40]
Epoch 44: 100%|##########| 1/1 [00:00<00:00,  2.89it/s, v_num=13, train_loss_step=12.50, train_loss_epoch=11.40]
Epoch 44: 100%|##########| 1/1 [00:00<00:00,  2.89it/s, v_num=13, train_loss_step=12.50, train_loss_epoch=12.50]
Epoch 44:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=12.50, train_loss_epoch=12.50]        
Epoch 45:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=12.50, train_loss_epoch=12.50]
Epoch 45: 100%|##########| 1/1 [00:00<00:00,  3.43it/s, v_num=13, train_loss_step=12.50, train_loss_epoch=12.50]
Epoch 45: 100%|##########| 1/1 [00:00<00:00,  3.43it/s, v_num=13, train_loss_step=13.20, train_loss_epoch=12.50]
Epoch 45: 100%|##########| 1/1 [00:00<00:00,  3.43it/s, v_num=13, train_loss_step=13.20, train_loss_epoch=13.20]
Epoch 45:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=13.20, train_loss_epoch=13.20]        
Epoch 46:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=13.20, train_loss_epoch=13.20]
Epoch 46: 100%|##########| 1/1 [00:00<00:00,  4.06it/s, v_num=13, train_loss_step=13.20, train_loss_epoch=13.20]
Epoch 46: 100%|##########| 1/1 [00:00<00:00,  4.06it/s, v_num=13, train_loss_step=11.90, train_loss_epoch=13.20]
Epoch 46: 100%|##########| 1/1 [00:00<00:00,  4.06it/s, v_num=13, train_loss_step=11.90, train_loss_epoch=11.90]
Epoch 46:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=11.90, train_loss_epoch=11.90]        
Epoch 47:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=11.90, train_loss_epoch=11.90]
Epoch 47: 100%|##########| 1/1 [00:00<00:00,  3.79it/s, v_num=13, train_loss_step=11.90, train_loss_epoch=11.90]
Epoch 47: 100%|##########| 1/1 [00:00<00:00,  3.79it/s, v_num=13, train_loss_step=10.60, train_loss_epoch=11.90]
Epoch 47: 100%|##########| 1/1 [00:00<00:00,  3.79it/s, v_num=13, train_loss_step=10.60, train_loss_epoch=10.60]
Epoch 47:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=10.60, train_loss_epoch=10.60]        
Epoch 48:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=10.60, train_loss_epoch=10.60]
Epoch 48: 100%|##########| 1/1 [00:00<00:00,  3.60it/s, v_num=13, train_loss_step=10.60, train_loss_epoch=10.60]
Epoch 48: 100%|##########| 1/1 [00:00<00:00,  3.60it/s, v_num=13, train_loss_step=12.10, train_loss_epoch=10.60]
Epoch 48: 100%|##########| 1/1 [00:00<00:00,  3.60it/s, v_num=13, train_loss_step=12.10, train_loss_epoch=12.10]
Epoch 48:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=12.10, train_loss_epoch=12.10]        
Epoch 49:   0%|          | 0/1 [00:00<?, ?it/s, v_num=13, train_loss_step=12.10, train_loss_epoch=12.10]
Epoch 49: 100%|##########| 1/1 [00:00<00:00,  3.88it/s, v_num=13, train_loss_step=12.10, train_loss_epoch=12.10]
Epoch 49: 100%|##########| 1/1 [00:00<00:00,  3.88it/s, v_num=13, train_loss_step=12.00, train_loss_epoch=12.10]
Epoch 49: 100%|##########| 1/1 [00:00<00:00,  3.65it/s, v_num=13, train_loss_step=12.00, train_loss_epoch=12.00]
Epoch 49: 100%|##########| 1/1 [00:00<00:00,  3.65it/s, v_num=13, train_loss_step=12.00, train_loss_epoch=12.00]

Sanity Checking: 0it [00:00, ?it/s]
Sanity Checking:   0%|          | 0/1 [00:00<?, ?it/s]
Sanity Checking DataLoader 0:   0%|          | 0/1 [00:00<?, ?it/s]
Sanity Checking DataLoader 0: 100%|##########| 1/1 [00:00<?, ?it/s]

Training: 0it [00:00, ?it/s]
Training:   0%|          | 0/1 [00:00<?, ?it/s]
Epoch 0:   0%|          | 0/1 [00:00<?, ?it/s] 
Epoch 0: 100%|##########| 1/1 [00:00<00:00,  3.81it/s]
Epoch 0: 100%|##########| 1/1 [00:00<00:00,  3.81it/s, v_num=14, train_loss_step=47.00]
Epoch 0: 100%|##########| 1/1 [00:00<00:00,  3.81it/s, v_num=14, train_loss_step=47.00, train_loss_epoch=47.00]
Epoch 0:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=47.00, train_loss_epoch=47.00]        
Epoch 1:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=47.00, train_loss_epoch=47.00]
Epoch 1: 100%|##########| 1/1 [00:00<00:00,  3.83it/s, v_num=14, train_loss_step=47.00, train_loss_epoch=47.00]
Epoch 1: 100%|##########| 1/1 [00:00<00:00,  3.81it/s, v_num=14, train_loss_step=82.90, train_loss_epoch=47.00]
Epoch 1: 100%|##########| 1/1 [00:00<00:00,  3.81it/s, v_num=14, train_loss_step=82.90, train_loss_epoch=82.90]
Epoch 1:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=82.90, train_loss_epoch=82.90]        
Epoch 2:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=82.90, train_loss_epoch=82.90]
Epoch 2: 100%|##########| 1/1 [00:00<00:00,  3.30it/s, v_num=14, train_loss_step=82.90, train_loss_epoch=82.90]
Epoch 2: 100%|##########| 1/1 [00:00<00:00,  3.30it/s, v_num=14, train_loss_step=52.40, train_loss_epoch=82.90]
Epoch 2: 100%|##########| 1/1 [00:00<00:00,  3.30it/s, v_num=14, train_loss_step=52.40, train_loss_epoch=52.40]
Epoch 2:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=52.40, train_loss_epoch=52.40]        
Epoch 3:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=52.40, train_loss_epoch=52.40]
Epoch 3: 100%|##########| 1/1 [00:00<00:00,  3.98it/s, v_num=14, train_loss_step=52.40, train_loss_epoch=52.40]
Epoch 3: 100%|##########| 1/1 [00:00<00:00,  3.98it/s, v_num=14, train_loss_step=47.60, train_loss_epoch=52.40]
Epoch 3: 100%|##########| 1/1 [00:00<00:00,  3.98it/s, v_num=14, train_loss_step=47.60, train_loss_epoch=47.60]
Epoch 3:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=47.60, train_loss_epoch=47.60]        
Epoch 4:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=47.60, train_loss_epoch=47.60]
Epoch 4: 100%|##########| 1/1 [00:00<00:00,  3.79it/s, v_num=14, train_loss_step=47.60, train_loss_epoch=47.60]
Epoch 4: 100%|##########| 1/1 [00:00<00:00,  3.58it/s, v_num=14, train_loss_step=42.70, train_loss_epoch=47.60]
Epoch 4: 100%|##########| 1/1 [00:00<00:00,  3.58it/s, v_num=14, train_loss_step=42.70, train_loss_epoch=42.70]
Epoch 4:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=42.70, train_loss_epoch=42.70]        
Epoch 5:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=42.70, train_loss_epoch=42.70]
Epoch 5: 100%|##########| 1/1 [00:00<00:00,  3.56it/s, v_num=14, train_loss_step=42.70, train_loss_epoch=42.70]
Epoch 5: 100%|##########| 1/1 [00:00<00:00,  3.56it/s, v_num=14, train_loss_step=39.80, train_loss_epoch=42.70]
Epoch 5: 100%|##########| 1/1 [00:00<00:00,  3.56it/s, v_num=14, train_loss_step=39.80, train_loss_epoch=39.80]
Epoch 5:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=39.80, train_loss_epoch=39.80]        
Epoch 6:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=39.80, train_loss_epoch=39.80]
Epoch 6: 100%|##########| 1/1 [00:00<00:00,  3.76it/s, v_num=14, train_loss_step=39.80, train_loss_epoch=39.80]
Epoch 6: 100%|##########| 1/1 [00:00<00:00,  3.76it/s, v_num=14, train_loss_step=41.70, train_loss_epoch=39.80]
Epoch 6: 100%|##########| 1/1 [00:00<00:00,  3.76it/s, v_num=14, train_loss_step=41.70, train_loss_epoch=41.70]
Epoch 6:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=41.70, train_loss_epoch=41.70]        
Epoch 7:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=41.70, train_loss_epoch=41.70]
Epoch 7: 100%|##########| 1/1 [00:00<00:00,  3.34it/s, v_num=14, train_loss_step=41.70, train_loss_epoch=41.70]
Epoch 7: 100%|##########| 1/1 [00:00<00:00,  3.34it/s, v_num=14, train_loss_step=40.80, train_loss_epoch=41.70]
Epoch 7: 100%|##########| 1/1 [00:00<00:00,  3.34it/s, v_num=14, train_loss_step=40.80, train_loss_epoch=40.80]
Epoch 7:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=40.80, train_loss_epoch=40.80]        
Epoch 8:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=40.80, train_loss_epoch=40.80]
Epoch 8: 100%|##########| 1/1 [00:00<00:00,  3.56it/s, v_num=14, train_loss_step=40.80, train_loss_epoch=40.80]
Epoch 8: 100%|##########| 1/1 [00:00<00:00,  3.56it/s, v_num=14, train_loss_step=36.90, train_loss_epoch=40.80]
Epoch 8: 100%|##########| 1/1 [00:00<00:00,  3.56it/s, v_num=14, train_loss_step=36.90, train_loss_epoch=36.90]
Epoch 8:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=36.90, train_loss_epoch=36.90]        
Epoch 9:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=36.90, train_loss_epoch=36.90]
Epoch 9: 100%|##########| 1/1 [00:00<00:00,  3.68it/s, v_num=14, train_loss_step=36.90, train_loss_epoch=36.90]
Epoch 9: 100%|##########| 1/1 [00:00<00:00,  3.68it/s, v_num=14, train_loss_step=36.50, train_loss_epoch=36.90]
Epoch 9: 100%|##########| 1/1 [00:00<00:00,  3.68it/s, v_num=14, train_loss_step=36.50, train_loss_epoch=36.50]
Epoch 9:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=36.50, train_loss_epoch=36.50]        
Epoch 10:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=36.50, train_loss_epoch=36.50]
Epoch 10: 100%|##########| 1/1 [00:00<00:00,  3.77it/s, v_num=14, train_loss_step=36.50, train_loss_epoch=36.50]
Epoch 10: 100%|##########| 1/1 [00:00<00:00,  3.77it/s, v_num=14, train_loss_step=34.00, train_loss_epoch=36.50]
Epoch 10: 100%|##########| 1/1 [00:00<00:00,  3.77it/s, v_num=14, train_loss_step=34.00, train_loss_epoch=34.00]
Epoch 10:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=34.00, train_loss_epoch=34.00]        
Epoch 11:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=34.00, train_loss_epoch=34.00]
Epoch 11: 100%|##########| 1/1 [00:00<00:00,  3.51it/s, v_num=14, train_loss_step=34.00, train_loss_epoch=34.00]
Epoch 11: 100%|##########| 1/1 [00:00<00:00,  3.51it/s, v_num=14, train_loss_step=32.10, train_loss_epoch=34.00]
Epoch 11: 100%|##########| 1/1 [00:00<00:00,  3.51it/s, v_num=14, train_loss_step=32.10, train_loss_epoch=32.10]
Epoch 11:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=32.10, train_loss_epoch=32.10]        
Epoch 12:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=32.10, train_loss_epoch=32.10]
Epoch 12: 100%|##########| 1/1 [00:00<00:00,  3.56it/s, v_num=14, train_loss_step=32.10, train_loss_epoch=32.10]
Epoch 12: 100%|##########| 1/1 [00:00<00:00,  3.56it/s, v_num=14, train_loss_step=29.70, train_loss_epoch=32.10]
Epoch 12: 100%|##########| 1/1 [00:00<00:00,  3.56it/s, v_num=14, train_loss_step=29.70, train_loss_epoch=29.70]
Epoch 12:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=29.70, train_loss_epoch=29.70]        
Epoch 13:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=29.70, train_loss_epoch=29.70]
Epoch 13: 100%|##########| 1/1 [00:00<00:00,  3.80it/s, v_num=14, train_loss_step=29.70, train_loss_epoch=29.70]
Epoch 13: 100%|##########| 1/1 [00:00<00:00,  3.80it/s, v_num=14, train_loss_step=29.10, train_loss_epoch=29.70]
Epoch 13: 100%|##########| 1/1 [00:00<00:00,  3.80it/s, v_num=14, train_loss_step=29.10, train_loss_epoch=29.10]
Epoch 13:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=29.10, train_loss_epoch=29.10]        
Epoch 14:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=29.10, train_loss_epoch=29.10]
Epoch 14: 100%|##########| 1/1 [00:00<00:00,  3.24it/s, v_num=14, train_loss_step=29.10, train_loss_epoch=29.10]
Epoch 14: 100%|##########| 1/1 [00:00<00:00,  3.24it/s, v_num=14, train_loss_step=30.00, train_loss_epoch=29.10]
Epoch 14: 100%|##########| 1/1 [00:00<00:00,  3.24it/s, v_num=14, train_loss_step=30.00, train_loss_epoch=30.00]
Epoch 14:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=30.00, train_loss_epoch=30.00]        
Epoch 15:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=30.00, train_loss_epoch=30.00]
Epoch 15: 100%|##########| 1/1 [00:00<00:00,  4.16it/s, v_num=14, train_loss_step=30.00, train_loss_epoch=30.00]
Epoch 15: 100%|##########| 1/1 [00:00<00:00,  4.16it/s, v_num=14, train_loss_step=29.20, train_loss_epoch=30.00]
Epoch 15: 100%|##########| 1/1 [00:00<00:00,  3.91it/s, v_num=14, train_loss_step=29.20, train_loss_epoch=29.20]
Epoch 15:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=29.20, train_loss_epoch=29.20]        
Epoch 16:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=29.20, train_loss_epoch=29.20]
Epoch 16: 100%|##########| 1/1 [00:00<00:00,  3.97it/s, v_num=14, train_loss_step=29.20, train_loss_epoch=29.20]
Epoch 16: 100%|##########| 1/1 [00:00<00:00,  3.97it/s, v_num=14, train_loss_step=25.20, train_loss_epoch=29.20]
Epoch 16: 100%|##########| 1/1 [00:00<00:00,  3.97it/s, v_num=14, train_loss_step=25.20, train_loss_epoch=25.20]
Epoch 16:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=25.20, train_loss_epoch=25.20]        
Epoch 17:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=25.20, train_loss_epoch=25.20]
Epoch 17: 100%|##########| 1/1 [00:00<00:00,  3.60it/s, v_num=14, train_loss_step=25.20, train_loss_epoch=25.20]
Epoch 17: 100%|##########| 1/1 [00:00<00:00,  3.60it/s, v_num=14, train_loss_step=28.50, train_loss_epoch=25.20]
Epoch 17: 100%|##########| 1/1 [00:00<00:00,  3.58it/s, v_num=14, train_loss_step=28.50, train_loss_epoch=28.50]
Epoch 17:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=28.50, train_loss_epoch=28.50]        
Epoch 18:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=28.50, train_loss_epoch=28.50]
Epoch 18: 100%|##########| 1/1 [00:00<00:00,  4.04it/s, v_num=14, train_loss_step=28.50, train_loss_epoch=28.50]
Epoch 18: 100%|##########| 1/1 [00:00<00:00,  4.04it/s, v_num=14, train_loss_step=23.60, train_loss_epoch=28.50]
Epoch 18: 100%|##########| 1/1 [00:00<00:00,  4.04it/s, v_num=14, train_loss_step=23.60, train_loss_epoch=23.60]
Epoch 18:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=23.60, train_loss_epoch=23.60]        
Epoch 19:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=23.60, train_loss_epoch=23.60]
Epoch 19: 100%|##########| 1/1 [00:00<00:00,  3.22it/s, v_num=14, train_loss_step=23.60, train_loss_epoch=23.60]
Epoch 19: 100%|##########| 1/1 [00:00<00:00,  3.21it/s, v_num=14, train_loss_step=24.90, train_loss_epoch=23.60]
Epoch 19: 100%|##########| 1/1 [00:00<00:00,  3.20it/s, v_num=14, train_loss_step=24.90, train_loss_epoch=24.90]
Epoch 19:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=24.90, train_loss_epoch=24.90]        
Epoch 20:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=24.90, train_loss_epoch=24.90]
Epoch 20: 100%|##########| 1/1 [00:00<00:00,  3.37it/s, v_num=14, train_loss_step=24.90, train_loss_epoch=24.90]
Epoch 20: 100%|##########| 1/1 [00:00<00:00,  3.37it/s, v_num=14, train_loss_step=21.70, train_loss_epoch=24.90]
Epoch 20: 100%|##########| 1/1 [00:00<00:00,  3.37it/s, v_num=14, train_loss_step=21.70, train_loss_epoch=21.70]
Epoch 20:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=21.70, train_loss_epoch=21.70]        
Epoch 21:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=21.70, train_loss_epoch=21.70]
Epoch 21: 100%|##########| 1/1 [00:00<00:00,  3.54it/s, v_num=14, train_loss_step=21.70, train_loss_epoch=21.70]
Epoch 21: 100%|##########| 1/1 [00:00<00:00,  3.54it/s, v_num=14, train_loss_step=23.70, train_loss_epoch=21.70]
Epoch 21: 100%|##########| 1/1 [00:00<00:00,  3.54it/s, v_num=14, train_loss_step=23.70, train_loss_epoch=23.70]
Epoch 21:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=23.70, train_loss_epoch=23.70]        
Epoch 22:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=23.70, train_loss_epoch=23.70]
Epoch 22: 100%|##########| 1/1 [00:00<00:00,  3.64it/s, v_num=14, train_loss_step=23.70, train_loss_epoch=23.70]
Epoch 22: 100%|##########| 1/1 [00:00<00:00,  3.64it/s, v_num=14, train_loss_step=21.50, train_loss_epoch=23.70]
Epoch 22: 100%|##########| 1/1 [00:00<00:00,  3.64it/s, v_num=14, train_loss_step=21.50, train_loss_epoch=21.50]
Epoch 22:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=21.50, train_loss_epoch=21.50]        
Epoch 23:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=21.50, train_loss_epoch=21.50]
Epoch 23: 100%|##########| 1/1 [00:00<00:00,  3.51it/s, v_num=14, train_loss_step=21.50, train_loss_epoch=21.50]
Epoch 23: 100%|##########| 1/1 [00:00<00:00,  3.51it/s, v_num=14, train_loss_step=21.90, train_loss_epoch=21.50]
Epoch 23: 100%|##########| 1/1 [00:00<00:00,  3.51it/s, v_num=14, train_loss_step=21.90, train_loss_epoch=21.90]
Epoch 23:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=21.90, train_loss_epoch=21.90]        
Epoch 24:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=21.90, train_loss_epoch=21.90]
Epoch 24: 100%|##########| 1/1 [00:00<00:00,  3.29it/s, v_num=14, train_loss_step=21.90, train_loss_epoch=21.90]
Epoch 24: 100%|##########| 1/1 [00:00<00:00,  3.29it/s, v_num=14, train_loss_step=21.00, train_loss_epoch=21.90]
Epoch 24: 100%|##########| 1/1 [00:00<00:00,  3.29it/s, v_num=14, train_loss_step=21.00, train_loss_epoch=21.00]
Epoch 24:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=21.00, train_loss_epoch=21.00]        
Epoch 25:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=21.00, train_loss_epoch=21.00]
Epoch 25: 100%|##########| 1/1 [00:00<00:00,  3.77it/s, v_num=14, train_loss_step=21.00, train_loss_epoch=21.00]
Epoch 25: 100%|##########| 1/1 [00:00<00:00,  3.77it/s, v_num=14, train_loss_step=20.40, train_loss_epoch=21.00]
Epoch 25: 100%|##########| 1/1 [00:00<00:00,  3.77it/s, v_num=14, train_loss_step=20.40, train_loss_epoch=20.40]
Epoch 25:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=20.40, train_loss_epoch=20.40]        
Epoch 26:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=20.40, train_loss_epoch=20.40]
Epoch 26: 100%|##########| 1/1 [00:00<00:00,  3.92it/s, v_num=14, train_loss_step=20.40, train_loss_epoch=20.40]
Epoch 26: 100%|##########| 1/1 [00:00<00:00,  3.92it/s, v_num=14, train_loss_step=21.10, train_loss_epoch=20.40]
Epoch 26: 100%|##########| 1/1 [00:00<00:00,  3.92it/s, v_num=14, train_loss_step=21.10, train_loss_epoch=21.10]
Epoch 26:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=21.10, train_loss_epoch=21.10]        
Epoch 27:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=21.10, train_loss_epoch=21.10]
Epoch 27: 100%|##########| 1/1 [00:00<00:00,  3.53it/s, v_num=14, train_loss_step=21.10, train_loss_epoch=21.10]
Epoch 27: 100%|##########| 1/1 [00:00<00:00,  3.53it/s, v_num=14, train_loss_step=19.30, train_loss_epoch=21.10]
Epoch 27: 100%|##########| 1/1 [00:00<00:00,  3.53it/s, v_num=14, train_loss_step=19.30, train_loss_epoch=19.30]
Epoch 27:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=19.30, train_loss_epoch=19.30]        
Epoch 28:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=19.30, train_loss_epoch=19.30]
Epoch 28: 100%|##########| 1/1 [00:00<00:00,  3.64it/s, v_num=14, train_loss_step=19.30, train_loss_epoch=19.30]
Epoch 28: 100%|##########| 1/1 [00:00<00:00,  3.64it/s, v_num=14, train_loss_step=19.90, train_loss_epoch=19.30]
Epoch 28: 100%|##########| 1/1 [00:00<00:00,  3.64it/s, v_num=14, train_loss_step=19.90, train_loss_epoch=19.90]
Epoch 28:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=19.90, train_loss_epoch=19.90]        
Epoch 29:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=19.90, train_loss_epoch=19.90]
Epoch 29: 100%|##########| 1/1 [00:00<00:00,  3.74it/s, v_num=14, train_loss_step=19.90, train_loss_epoch=19.90]
Epoch 29: 100%|##########| 1/1 [00:00<00:00,  3.74it/s, v_num=14, train_loss_step=19.00, train_loss_epoch=19.90]
Epoch 29: 100%|##########| 1/1 [00:00<00:00,  3.74it/s, v_num=14, train_loss_step=19.00, train_loss_epoch=19.00]
Epoch 29:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=19.00, train_loss_epoch=19.00]        
Epoch 30:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=19.00, train_loss_epoch=19.00]
Epoch 30: 100%|##########| 1/1 [00:00<00:00,  3.36it/s, v_num=14, train_loss_step=19.00, train_loss_epoch=19.00]
Epoch 30: 100%|##########| 1/1 [00:00<00:00,  3.36it/s, v_num=14, train_loss_step=19.20, train_loss_epoch=19.00]
Epoch 30: 100%|##########| 1/1 [00:00<00:00,  3.35it/s, v_num=14, train_loss_step=19.20, train_loss_epoch=19.20]
Epoch 30:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=19.20, train_loss_epoch=19.20]        
Epoch 31:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=19.20, train_loss_epoch=19.20]
Epoch 31: 100%|##########| 1/1 [00:00<00:00,  3.41it/s, v_num=14, train_loss_step=19.20, train_loss_epoch=19.20]
Epoch 31: 100%|##########| 1/1 [00:00<00:00,  3.41it/s, v_num=14, train_loss_step=17.20, train_loss_epoch=19.20]
Epoch 31: 100%|##########| 1/1 [00:00<00:00,  3.41it/s, v_num=14, train_loss_step=17.20, train_loss_epoch=17.20]
Epoch 31:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=17.20, train_loss_epoch=17.20]        
Epoch 32:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=17.20, train_loss_epoch=17.20]
Epoch 32: 100%|##########| 1/1 [00:00<00:00,  4.27it/s, v_num=14, train_loss_step=17.20, train_loss_epoch=17.20]
Epoch 32: 100%|##########| 1/1 [00:00<00:00,  4.27it/s, v_num=14, train_loss_step=17.50, train_loss_epoch=17.20]
Epoch 32: 100%|##########| 1/1 [00:00<00:00,  4.27it/s, v_num=14, train_loss_step=17.50, train_loss_epoch=17.50]
Epoch 32:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=17.50, train_loss_epoch=17.50]        
Epoch 33:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=17.50, train_loss_epoch=17.50]
Epoch 33: 100%|##########| 1/1 [00:00<00:00,  3.77it/s, v_num=14, train_loss_step=17.50, train_loss_epoch=17.50]
Epoch 33: 100%|##########| 1/1 [00:00<00:00,  3.77it/s, v_num=14, train_loss_step=16.70, train_loss_epoch=17.50]
Epoch 33: 100%|##########| 1/1 [00:00<00:00,  3.77it/s, v_num=14, train_loss_step=16.70, train_loss_epoch=16.70]
Epoch 33:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=16.70, train_loss_epoch=16.70]        
Epoch 34:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=16.70, train_loss_epoch=16.70]
Epoch 34: 100%|##########| 1/1 [00:00<00:00,  3.68it/s, v_num=14, train_loss_step=16.70, train_loss_epoch=16.70]
Epoch 34: 100%|##########| 1/1 [00:00<00:00,  3.68it/s, v_num=14, train_loss_step=16.50, train_loss_epoch=16.70]
Epoch 34: 100%|##########| 1/1 [00:00<00:00,  3.68it/s, v_num=14, train_loss_step=16.50, train_loss_epoch=16.50]
Epoch 34:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=16.50, train_loss_epoch=16.50]        
Epoch 35:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=16.50, train_loss_epoch=16.50]
Epoch 35: 100%|##########| 1/1 [00:00<00:00,  3.72it/s, v_num=14, train_loss_step=16.50, train_loss_epoch=16.50]
Epoch 35: 100%|##########| 1/1 [00:00<00:00,  3.72it/s, v_num=14, train_loss_step=16.40, train_loss_epoch=16.50]
Epoch 35: 100%|##########| 1/1 [00:00<00:00,  3.72it/s, v_num=14, train_loss_step=16.40, train_loss_epoch=16.40]
Epoch 35:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=16.40, train_loss_epoch=16.40]        
Epoch 36:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=16.40, train_loss_epoch=16.40]
Epoch 36: 100%|##########| 1/1 [00:00<00:00,  3.41it/s, v_num=14, train_loss_step=16.40, train_loss_epoch=16.40]
Epoch 36: 100%|##########| 1/1 [00:00<00:00,  3.41it/s, v_num=14, train_loss_step=15.70, train_loss_epoch=16.40]
Epoch 36: 100%|##########| 1/1 [00:00<00:00,  3.41it/s, v_num=14, train_loss_step=15.70, train_loss_epoch=15.70]
Epoch 36:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=15.70, train_loss_epoch=15.70]        
Epoch 37:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=15.70, train_loss_epoch=15.70]
Epoch 37: 100%|##########| 1/1 [00:00<00:00,  3.99it/s, v_num=14, train_loss_step=15.70, train_loss_epoch=15.70]
Epoch 37: 100%|##########| 1/1 [00:00<00:00,  3.99it/s, v_num=14, train_loss_step=14.80, train_loss_epoch=15.70]
Epoch 37: 100%|##########| 1/1 [00:00<00:00,  3.99it/s, v_num=14, train_loss_step=14.80, train_loss_epoch=14.80]
Epoch 37:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=14.80, train_loss_epoch=14.80]        
Epoch 38:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=14.80, train_loss_epoch=14.80]
Epoch 38: 100%|##########| 1/1 [00:00<00:00,  4.31it/s, v_num=14, train_loss_step=14.80, train_loss_epoch=14.80]
Epoch 38: 100%|##########| 1/1 [00:00<00:00,  4.31it/s, v_num=14, train_loss_step=15.10, train_loss_epoch=14.80]
Epoch 38: 100%|##########| 1/1 [00:00<00:00,  4.31it/s, v_num=14, train_loss_step=15.10, train_loss_epoch=15.10]
Epoch 38:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=15.10, train_loss_epoch=15.10]        
Epoch 39:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=15.10, train_loss_epoch=15.10]
Epoch 39: 100%|##########| 1/1 [00:00<00:00,  3.72it/s, v_num=14, train_loss_step=15.10, train_loss_epoch=15.10]
Epoch 39: 100%|##########| 1/1 [00:00<00:00,  3.51it/s, v_num=14, train_loss_step=14.90, train_loss_epoch=15.10]
Epoch 39: 100%|##########| 1/1 [00:00<00:00,  3.51it/s, v_num=14, train_loss_step=14.90, train_loss_epoch=14.90]
Epoch 39:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=14.90, train_loss_epoch=14.90]        
Epoch 40:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=14.90, train_loss_epoch=14.90]
Epoch 40: 100%|##########| 1/1 [00:00<00:00,  3.20it/s, v_num=14, train_loss_step=14.90, train_loss_epoch=14.90]
Epoch 40: 100%|##########| 1/1 [00:00<00:00,  3.20it/s, v_num=14, train_loss_step=14.40, train_loss_epoch=14.90]
Epoch 40: 100%|##########| 1/1 [00:00<00:00,  3.19it/s, v_num=14, train_loss_step=14.40, train_loss_epoch=14.40]
Epoch 40:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=14.40, train_loss_epoch=14.40]        
Epoch 41:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=14.40, train_loss_epoch=14.40]
Epoch 41: 100%|##########| 1/1 [00:00<00:00,  3.03it/s, v_num=14, train_loss_step=14.40, train_loss_epoch=14.40]
Epoch 41: 100%|##########| 1/1 [00:00<00:00,  3.03it/s, v_num=14, train_loss_step=14.30, train_loss_epoch=14.40]
Epoch 41: 100%|##########| 1/1 [00:00<00:00,  3.03it/s, v_num=14, train_loss_step=14.30, train_loss_epoch=14.30]
Epoch 41:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=14.30, train_loss_epoch=14.30]        
Epoch 42:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=14.30, train_loss_epoch=14.30]
Epoch 42: 100%|##########| 1/1 [00:00<00:00,  3.37it/s, v_num=14, train_loss_step=14.30, train_loss_epoch=14.30]
Epoch 42: 100%|##########| 1/1 [00:00<00:00,  3.37it/s, v_num=14, train_loss_step=14.30, train_loss_epoch=14.30]
Epoch 42: 100%|##########| 1/1 [00:00<00:00,  3.37it/s, v_num=14, train_loss_step=14.30, train_loss_epoch=14.30]
Epoch 42:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=14.30, train_loss_epoch=14.30]        
Epoch 43:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=14.30, train_loss_epoch=14.30]
Epoch 43: 100%|##########| 1/1 [00:00<00:00,  4.21it/s, v_num=14, train_loss_step=14.30, train_loss_epoch=14.30]
Epoch 43: 100%|##########| 1/1 [00:00<00:00,  4.21it/s, v_num=14, train_loss_step=13.40, train_loss_epoch=14.30]
Epoch 43: 100%|##########| 1/1 [00:00<00:00,  4.21it/s, v_num=14, train_loss_step=13.40, train_loss_epoch=13.40]
Epoch 43:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=13.40, train_loss_epoch=13.40]        
Epoch 44:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=13.40, train_loss_epoch=13.40]
Epoch 44: 100%|##########| 1/1 [00:00<00:00,  3.77it/s, v_num=14, train_loss_step=13.40, train_loss_epoch=13.40]
Epoch 44: 100%|##########| 1/1 [00:00<00:00,  3.77it/s, v_num=14, train_loss_step=14.50, train_loss_epoch=13.40]
Epoch 44: 100%|##########| 1/1 [00:00<00:00,  3.77it/s, v_num=14, train_loss_step=14.50, train_loss_epoch=14.50]
Epoch 44:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=14.50, train_loss_epoch=14.50]        
Epoch 45:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=14.50, train_loss_epoch=14.50]
Epoch 45: 100%|##########| 1/1 [00:00<00:00,  3.73it/s, v_num=14, train_loss_step=14.50, train_loss_epoch=14.50]
Epoch 45: 100%|##########| 1/1 [00:00<00:00,  3.73it/s, v_num=14, train_loss_step=14.40, train_loss_epoch=14.50]
Epoch 45: 100%|##########| 1/1 [00:00<00:00,  3.73it/s, v_num=14, train_loss_step=14.40, train_loss_epoch=14.40]
Epoch 45:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=14.40, train_loss_epoch=14.40]        
Epoch 46:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=14.40, train_loss_epoch=14.40]
Epoch 46: 100%|##########| 1/1 [00:00<00:00,  3.41it/s, v_num=14, train_loss_step=14.40, train_loss_epoch=14.40]
Epoch 46: 100%|##########| 1/1 [00:00<00:00,  3.41it/s, v_num=14, train_loss_step=12.90, train_loss_epoch=14.40]
Epoch 46: 100%|##########| 1/1 [00:00<00:00,  3.41it/s, v_num=14, train_loss_step=12.90, train_loss_epoch=12.90]
Epoch 46:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=12.90, train_loss_epoch=12.90]        
Epoch 47:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=12.90, train_loss_epoch=12.90]
Epoch 47: 100%|##########| 1/1 [00:00<00:00,  3.54it/s, v_num=14, train_loss_step=12.90, train_loss_epoch=12.90]
Epoch 47: 100%|##########| 1/1 [00:00<00:00,  3.54it/s, v_num=14, train_loss_step=13.20, train_loss_epoch=12.90]
Epoch 47: 100%|##########| 1/1 [00:00<00:00,  3.54it/s, v_num=14, train_loss_step=13.20, train_loss_epoch=13.20]
Epoch 47:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=13.20, train_loss_epoch=13.20]        
Epoch 48:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=13.20, train_loss_epoch=13.20]
Epoch 48: 100%|##########| 1/1 [00:00<00:00,  3.31it/s, v_num=14, train_loss_step=13.20, train_loss_epoch=13.20]
Epoch 48: 100%|##########| 1/1 [00:00<00:00,  3.30it/s, v_num=14, train_loss_step=14.10, train_loss_epoch=13.20]
Epoch 48: 100%|##########| 1/1 [00:00<00:00,  3.30it/s, v_num=14, train_loss_step=14.10, train_loss_epoch=14.10]
Epoch 48:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=14.10, train_loss_epoch=14.10]        
Epoch 49:   0%|          | 0/1 [00:00<?, ?it/s, v_num=14, train_loss_step=14.10, train_loss_epoch=14.10]
Epoch 49: 100%|##########| 1/1 [00:00<00:00,  3.42it/s, v_num=14, train_loss_step=14.10, train_loss_epoch=14.10]
Epoch 49: 100%|##########| 1/1 [00:00<00:00,  3.41it/s, v_num=14, train_loss_step=12.90, train_loss_epoch=14.10]
Epoch 49: 100%|##########| 1/1 [00:00<00:00,  3.38it/s, v_num=14, train_loss_step=12.90, train_loss_epoch=12.90]
Epoch 49: 100%|##########| 1/1 [00:00<00:00,  3.36it/s, v_num=14, train_loss_step=12.90, train_loss_epoch=12.90]
Y_hat_df = nf.predict().reset_index()
Predicting: 0it [00:00, ?it/s]
Predicting:   0%|          | 0/1 [00:00<?, ?it/s]
Predicting DataLoader 0:   0%|          | 0/1 [00:00<?, ?it/s]
Predicting DataLoader 0: 100%|##########| 1/1 [00:00<00:00, 167.11it/s]
Predicting DataLoader 0: 100%|##########| 1/1 [00:00<00:00, 167.11it/s]

Predicting: 0it [00:00, ?it/s]
Predicting:   0%|          | 0/1 [00:00<?, ?it/s]
Predicting DataLoader 0:   0%|          | 0/1 [00:00<?, ?it/s]
Predicting DataLoader 0: 100%|##########| 1/1 [00:00<00:00, 83.56it/s]
Predicting DataLoader 0: 100%|##########| 1/1 [00:00<00:00, 77.14it/s]

# Plot predictions
# fig, ax = plt.subplots(1, 1, figsize = (20, 7))
Y_hat_df = Y_test_df.merge(Y_hat_df, how='left', on=['unique_id', 'ds'])
plot_df = pd.concat([Y_train_df, Y_hat_df]).set_index('ds')

# plot_df[['y', 'NBEATS', 'NHITS']].plot(ax=ax, linewidth=2)
# 
# ax.set_title('AirPassengers Forecast', fontsize=22)
# ax.set_ylabel('Monthly Passengers', fontsize=20)
# ax.set_xlabel('Timestamp [t]', fontsize=20)
# ax.legend(prop={'size': 15})
# ax.grid()

porting over to R with reticulate

library(reticulate)

ideas for bridging and porting to R from python, these would be handled in the library so that it is easy to wrap with NBEATS, or NHITS:

# forecasting tool
NeuralForecast <- py_run_string("from neuralforecast import NeuralForecast")

# models we want
# NBEATS <- py_run_string("from neuralforecast.models import NBEATS")
# NHITS  <- py_run_string("from neuralforecast.models import NHITS")

nf <- reticulate::import("neuralforecast") # importing entire module during testing instead of subs for models

# test dataset 
AirPassengersDF <- py_run_string("from neuralforecast.utils import AirPassengersDF")

data split in R:

library(dplyr)
Attaching package: 'dplyr'

The following objects are masked from 'package:stats':

    filter, lag

The following objects are masked from 'package:base':

    intersect, setdiff, setequal, union
# Split data and declare panel dataset
Y_df = AirPassengersDF$AirPassengersDF
Y_train_df = Y_df |> 
              dplyr::filter(ds<='1959-12-31') # 132 train

Y_test_df = Y_df |>
             dplyr::filter(ds>'1959-12-31') # 12 test

The Issue:

# Fit and predict with NBEATS and NHITS models
horizon <- length(Y_test_df$ds)

# running into issues here ??? same setup as python ???? ----
# models <- c(nf$models$NBEATS(input_size=(2 * horizon), h=horizon, max_steps=50),
#              nf$models$NHITS(input_size=(2 * horizon), h=horizon, max_steps=50))

print("Global seed set to 1
Error in py_call_impl(callable, call_args$unnamed, call_args$named) : 
  TypeError: empty(): argument 'size' must be tuple of ints, but found element of type float at pos 2")
[1] "Global seed set to 1\nError in py_call_impl(callable, call_args$unnamed, call_args$named) : \n  TypeError: empty(): argument 'size' must be tuple of ints, but found element of type float at pos 2"

although, could train models in python and reference like so, but would like advice on creating models object without a tuple error.

# using the py envs models until I have a fix.
neural_setup <- NeuralForecast$NeuralForecast(models=py$models, freq='M')

neural_fit <- neural_setup$fit(df=Y_train_df)

neural_cast <- neural_setup$predict(neural_fit)
Warning in py_to_r.pandas.core.frame.DataFrame(result): index contains
duplicated values: row names not set
neural_cast
                    ds   NBEATS    NHITS
1  1960-01-30 16:00:00 415.5529 416.9964
2  1960-02-28 16:00:00 393.3172 393.3534
3  1960-03-30 16:00:00 474.9370 467.4177
4  1960-04-29 17:00:00 460.1109 469.5287
5  1960-05-30 17:00:00 466.7129 471.2119
6  1960-06-29 17:00:00 554.7439 552.1646
7  1960-07-30 17:00:00 630.1102 631.9827
8  1960-08-30 17:00:00 637.1500 639.9821
9  1960-09-29 16:00:00 536.7354 550.8594
10 1960-10-30 16:00:00 463.9492 460.3989
11 1960-11-29 16:00:00 403.9283 405.4719
12 1960-12-30 16:00:00 457.2660 458.0701

Use case

I'm looking to leverage the current python model APIs within R via reticulate. Using reticulate should make it easy but ran into an issue with tuples . Looking for advice to create the proper model objects without running a python code chunk. The issue seems to be with the format of input_size but wasn't able to force the creation of the model objects. "argument 'size' must be tuple of ints, but found element of type float at pos 2"

kdgutier commented 1 year ago

Hey @frankiethull,

Thanks a lot for this effort. Once you have it working, please let us know. We will gladly include a tutorial in the documentation.

Regarding your bug, I would respect the types in the instantiation of the models. For instance, you declare input_size=(2 * horizon) as a tuple with an integer rather than an integer input_size=2 * horizon.

Or try to coerce the type of 2*horizon to be an integer because this parameter defines the model's dimensions and cannot receive a float.

frankiethull commented 1 year ago

Hi @kdgutier - thanks for the quick reply. Hopefully I can get something working then!

I have tried things like: nf$models$NBEATS(input_size=2 * horizon, h=horizon, max_steps=50) nf$models$NBEATS(input_size=2*horizon, h=horizon, max_steps=50) nf$models$NBEATS(input_size=(2*horizon), h=horizon, max_steps=50) nf$models$NBEATS(input_size=24, h=horizon, max_steps=50) or going one step further into submodules: nf$models$nbeats$NBEATS(input_size=2 * horizon, h=horizon, max_steps=50)

But all return the same error which I am surprised. My initial PoC with with statsforecast's AutoARIMA and I did not have the type errors.

kdgutier commented 1 year ago

Can you try using as.integer(2 * horizon)?

frankiethull commented 1 year ago

image

That worked!!!

frankiethull commented 1 year ago

tuple / float issue on R side fixed using as.integer()

kdgutier commented 1 year ago

@frankiethull, If you have the example running, adding it to a tutorial in the documentation would be super cool. I can gladly help with that. Let me know.

frankiethull commented 1 year ago

@kdgutier, I was thinking about creating a library for this (basically a few helper fcns). But until then, here's a quick tutorial of setup + use case based on the air passengers dataset (cleaned up code from above).

https://github.com/frankiethull/nixtla-r-tutorial

Let me know what you think and I am more than happy to work on more of these with you all. In addition, let me know what your thoughts are on the R extension library and if that would be something you would like to collaborate on. 90% of my time is spent in R so I know a lot of us R programmers would like to use the current and future nixtla algos. Appreciate your help today

frankiethull commented 1 year ago

@kdgutier - I kept the original setup tutorial (nixtla_r_tutorial.md) but see the new readme doc here:

https://github.com/frankiethull/nixtla-r-tutorial

I created helper functions for using neuralforecast via R. Have yet to pkg but think this works pretty well for a lite and easy implementation for my uses.

Let me know how you'd like to proceed on adding a tutorial on your end and I can test more on the R side.