diff --git a/pred/dataset.py b/pred/dataset.py index 9ed4846..409e423 100644 --- a/pred/dataset.py +++ b/pred/dataset.py @@ -37,6 +37,7 @@ class VideoPlayDataset(Dataset): ] else: self.feature_windows = [ + ( 5 * MINUTE, 0 * MINUTE), ( 15 * MINUTE, 0 * MINUTE), ( 40 * MINUTE, 0 * MINUTE), ( 1 * HOUR, 0 * HOUR), diff --git a/pred/inference.py b/pred/inference.py index 9a3d678..bf829cf 100644 --- a/pred/inference.py +++ b/pred/inference.py @@ -8,16 +8,16 @@ def main(): model.load_state_dict(torch.load('./pred/checkpoints/model_20250315_0530.pt')) model.eval() # inference - initial = 999269 + initial = 99906 last = initial - start_time = '2025-03-15 01:03:21' + start_time = '2025-03-16 14:48:42' for i in range(1, 48): - hour = i / 0.5 + hour = i / 4 sec = hour * 3600 time_d = np.log2(sec) data = [time_d, np.log2(initial+1), # time_delta, current_views - 2.801318, 3.455128, 3.903391, 3.995577, 4.641488, 5.75131, 6.723868, 6.105322, 8.141023, 9.576701, 10.665067, # grows_feat - 0.043993, 0.72057, 28.000902 # time_feat + 2.456146, 3.562719, 4.106399, 1.0, 1.0, 5.634413, 6.619818, 1.0, 8.608774, 10.19127, 11.412958, # grows_feat + 0.617153, 0.945308, 22.091431 # time_feat ] np_arr = np.array([data]) tensor = torch.from_numpy(np_arr).to('cpu', dtype=torch.float32)