Skip to content

Commit

Permalink
refactor: replace the argument d_inner with d_ffn;
Browse files Browse the repository at this point in the history
  • Loading branch information
WenjieDu committed Apr 1, 2024
1 parent ef048ea commit 7526d83
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion PyPOTS_Classification.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
" n_classes=physionet2012_dataset[\"n_classes\"],\n",
" n_layers=2,\n",
" d_model=physionet2012_dataset[\"n_features\"] * 4,\n",
" d_inner=256,\n",
" d_ffn=256,\n",
" n_heads=2,\n",
" dropout=0.3,\n",
" batch_size=32,\n",
Expand Down
8 changes: 3 additions & 5 deletions PyPOTS_Imputation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
" n_features=physionet2012_dataset['n_features'],\n",
" n_layers=2,\n",
" d_model=256,\n",
" d_inner=128,\n",
" d_ffn=128,\n",
" n_heads=4,\n",
" d_k=64,\n",
" d_v=64,\n",
Expand Down Expand Up @@ -245,7 +245,7 @@
" n_features=physionet2012_dataset['n_features'],\n",
" n_layers=6,\n",
" d_model=512,\n",
" d_inner=256,\n",
" d_ffn=256,\n",
" n_heads=4,\n",
" d_k=128,\n",
" d_v=128,\n",
Expand Down Expand Up @@ -530,7 +530,7 @@
" num_workers=0,\n",
" # just leave it to default as None, PyPOTS will automatically assign the best device for you.\n",
" # Set it as 'cpu' if you don't have CUDA devices. You can also set it to 'cuda:0' or 'cuda:1' if you have multiple CUDA devices, even parallelly on ['cuda:0', 'cuda:1']\n",
" device='cuda:1',\n",
" device=None,\n",
" # set the path for saving tensorboard and trained model files \n",
" saving_path=\"tutorial_results/imputation/csdi\",\n",
" # only save the best model after training finished.\n",
Expand Down Expand Up @@ -1047,10 +1047,8 @@
"source": [
"from pypots.optim import Adam\n",
"from pypots.imputation import MRNN\n",
"from pypots.utils.metrics import cal_mae\n",
"\n",
"# initialize the model\n",
"# initialize the model\n",
"mrnn = MRNN(\n",
" n_steps=physionet2012_dataset['n_steps'],\n",
" n_features=physionet2012_dataset['n_features'],\n",
Expand Down

0 comments on commit 7526d83

Please sign in to comment.