check on Colab option

This commit is contained in:
AleDinve
2024-10-31 15:26:00 +01:00
committed by Nicola Demo
parent a5e326c927
commit db521ef468
11 changed files with 18 additions and 14 deletions

View File

@@ -33,8 +33,8 @@
" !pip install \"pina-mathlab\"\n",
" # get the data\n",
" !mkdir \"data\"\n",
" !wget \"https://github.com/mathLab/PINA/blob/master/tutorials/tutorial10/dat/Data_KS.mat\" -O \"data/Data_KS.mat\"\n",
" !wget \"https://github.com/mathLab/PINA/blob/master/tutorials/tutorial10/dat/Data_KS2.mat\" -O \"data/Data_KS2.mat\"\n",
" !wget \"https://github.com/mathLab/PINA/raw/refs/heads/master/tutorials/tutorial10/data/Data_KS.mat\" -O \"data/Data_KS.mat\"\n",
" !wget \"https://github.com/mathLab/PINA/raw/refs/heads/master/tutorials/tutorial10/data/Data_KS2.mat\" -O \"data/Data_KS2.mat\"\n",
"\n",
"import torch\n",
"import matplotlib.pyplot as plt\n",
@@ -104,7 +104,7 @@
],
"source": [
"# load data\n",
"data=io.loadmat(\"dat/Data_KS.mat\")\n",
"data=io.loadmat(\"data/Data_KS.mat\")\n",
"\n",
"# converting to label tensor\n",
"initial_cond_train = LabelTensor(torch.tensor(data['initial_cond_train'], dtype=torch.float), ['t','x','u0'])\n",