Skip to content

Commit

Permalink
added PatchTST tutorial nb
Browse files Browse the repository at this point in the history
  • Loading branch information
oguiza committed Feb 21, 2023
1 parent f1a2084 commit 3a1b663
Show file tree
Hide file tree
Showing 4 changed files with 4,769 additions and 4 deletions.
6 changes: 3 additions & 3 deletions nbs/024_callback.core.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@
" store_attr()\n",
"\n",
" def before_fit(self):\n",
" self.run = not hasattr(self.learn, 'lr_finder') and not hasattr(self, \"gather_preds\") and not hasattr(self, \"summary\")\n",
" self.run = not hasattr(self.learn, 'lr_finder') and not hasattr(self, \"gather_preds\")\n",
" if not(self.run): return\n",
" self.nb_batches = []\n",
" self.learn.recorder.loss_idxs = [i for i,n in enumerate(self.learn.recorder.metric_names[1:-1]) if 'loss' in n]\n",
Expand Down Expand Up @@ -649,9 +649,9 @@
"name": "stdout",
"output_type": "stream",
"text": [
"/Users/nacho/notebooks/tsai/nbs/024_callback.core.ipynb saved at 2023-02-21 09:11:25\n",
"/Users/nacho/notebooks/tsai/nbs/024_callback.core.ipynb saved at 2023-02-21 13:46:35\n",
"Correct notebook to script conversion! 😃\n",
"Tuesday 21/02/23 09:11:28 CET\n"
"Tuesday 21/02/23 13:46:38 CET\n"
]
},
{
Expand Down
Binary file modified nbs/models/test.pth
Binary file not shown.
2 changes: 1 addition & 1 deletion tsai/callback/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def __init__(self, plot_metrics:bool=True, final_losses:bool=True, perc:float=.5
store_attr()

def before_fit(self):
self.run = not hasattr(self.learn, 'lr_finder') and not hasattr(self, "gather_preds") and not hasattr(self, "summary")
self.run = not hasattr(self.learn, 'lr_finder') and not hasattr(self, "gather_preds")
if not(self.run): return
self.nb_batches = []
self.learn.recorder.loss_idxs = [i for i,n in enumerate(self.learn.recorder.metric_names[1:-1]) if 'loss' in n]
Expand Down
4,765 changes: 4,765 additions & 0 deletions tutorial_nbs/15_PatchTST_a_new_transformer_for_LTSF.ipynb

Large diffs are not rendered by default.

0 comments on commit 3a1b663

Please sign in to comment.