updated download and phiflow install links
This commit is contained in:
@@ -28,7 +28,8 @@
|
|||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"!pip install --upgrade --quiet phiflow \n",
|
"#!pip install --upgrade --quiet phiflow\n",
|
||||||
|
"!pip install --upgrade --quiet git+https://github.com/tum-pbs/PhiFlow@develop \n",
|
||||||
"from phi.tf.flow import *\n",
|
"from phi.tf.flow import *\n",
|
||||||
"\n",
|
"\n",
|
||||||
"N = 128\n",
|
"N = 128\n",
|
||||||
@@ -589,4 +590,4 @@
|
|||||||
},
|
},
|
||||||
"nbformat": 4,
|
"nbformat": 4,
|
||||||
"nbformat_minor": 4
|
"nbformat_minor": 4
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -140,10 +140,10 @@
|
|||||||
"source": [
|
"source": [
|
||||||
"import os, sys, logging, argparse, pickle, glob, random, distutils.dir_util, urllib.request\n",
|
"import os, sys, logging, argparse, pickle, glob, random, distutils.dir_util, urllib.request\n",
|
||||||
"\n",
|
"\n",
|
||||||
"fname_train = 'pbdl-sol-karman-2d-train.pickle'\n",
|
"fname_train = 'sol-karman-2d-train.pickle'\n",
|
||||||
"if not os.path.isfile(fname_train):\n",
|
"if not os.path.isfile(fname_train):\n",
|
||||||
" print(\"Downloading training data (73MB), this can take a moment the first time...\")\n",
|
" print(\"Downloading training data (73MB), this can take a moment the first time...\")\n",
|
||||||
" urllib.request.urlretrieve(\"https://ge.in.tum.de/download/2020-solver-in-the-loop/\"+fname_train, fname_train)\n",
|
" urllib.request.urlretrieve(\"https://physicsbaseddeeplearning.org/data/\"+fname_train, fname_train)\n",
|
||||||
"\n",
|
"\n",
|
||||||
"with open(fname_train, 'rb') as f: data_preloaded = pickle.load(f)\n",
|
"with open(fname_train, 'rb') as f: data_preloaded = pickle.load(f)\n",
|
||||||
"print(\"Loaded data, {} training sims\".format(len(data_preloaded)) )\n"
|
"print(\"Loaded data, {} training sims\".format(len(data_preloaded)) )\n"
|
||||||
@@ -170,7 +170,8 @@
|
|||||||
},
|
},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"!pip install --upgrade --quiet phiflow\n",
|
"#!pip install --upgrade --quiet phiflow\n",
|
||||||
|
"!pip install --upgrade --quiet git+https://github.com/tum-pbs/PhiFlow@develop \n",
|
||||||
"\n",
|
"\n",
|
||||||
"from phi.tf.flow import *\n",
|
"from phi.tf.flow import *\n",
|
||||||
"import tensorflow as tf\n",
|
"import tensorflow as tf\n",
|
||||||
@@ -912,7 +913,7 @@
|
|||||||
" loss = training_step_jit(dens_gt, vel_gt, re_nr, math.tensor(steps)) \n",
|
" loss = training_step_jit(dens_gt, vel_gt, re_nr, math.tensor(steps)) \n",
|
||||||
" \n",
|
" \n",
|
||||||
" steps += 1\n",
|
" steps += 1\n",
|
||||||
" if (j==0 and i<3) or (j==0 and ib==0 and i%32==0) or (j>0 and ib==0 and i%128==0): # reduce output \n",
|
" if (j==0 and i<3) or (j==0 and ib==0 and i%64==0) or (j>0 and ib==0 and i%248==0): # reduce output \n",
|
||||||
" print('epoch {:03d}/{:03d}, batch {:03d}/{:03d}, step {:04d}/{:04d}: loss={}'.format( j+1, EPOCHS, ib+1, dataset.numBatches, i+1, dataset.numSteps, loss ))\n",
|
" print('epoch {:03d}/{:03d}, batch {:03d}/{:03d}, step {:04d}/{:04d}: loss={}'.format( j+1, EPOCHS, ib+1, dataset.numBatches, i+1, dataset.numSteps, loss ))\n",
|
||||||
" \n",
|
" \n",
|
||||||
" dataset.nextStep()\n",
|
" dataset.nextStep()\n",
|
||||||
@@ -969,10 +970,10 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"source": [
|
"source": [
|
||||||
"fname_test = 'pbdl-sol-karman-2d-test.pickle'\n",
|
"fname_test = 'sol-karman-2d-test.pickle'\n",
|
||||||
"if not os.path.isfile(fname_test):\n",
|
"if not os.path.isfile(fname_test):\n",
|
||||||
" print(\"Downloading test data (38MB), this can take a moment the first time...\")\n",
|
" print(\"Downloading test data (38MB), this can take a moment the first time...\")\n",
|
||||||
" urllib.request.urlretrieve(\"https://ge.in.tum.de/download/2020-solver-in-the-loop/\"+fname_test, fname_test)\n",
|
" urllib.request.urlretrieve(\"https://physicsbaseddeeplearning.org/data/\"+fname_test, fname_test)\n",
|
||||||
"\n",
|
"\n",
|
||||||
"with open(fname_test, 'rb') as f: data_test_preloaded = pickle.load(f)\n",
|
"with open(fname_test, 'rb') as f: data_test_preloaded = pickle.load(f)\n",
|
||||||
"print(\"Loaded test data, {} training sims\".format(len(data_test_preloaded)) )"
|
"print(\"Loaded test data, {} training sims\".format(len(data_test_preloaded)) )"
|
||||||
@@ -1353,4 +1354,4 @@
|
|||||||
},
|
},
|
||||||
"nbformat": 4,
|
"nbformat": 4,
|
||||||
"nbformat_minor": 1
|
"nbformat_minor": 1
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,7 +50,8 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"source": [
|
"source": [
|
||||||
"!pip install --upgrade --quiet phiflow\n",
|
"#!pip install --upgrade --quiet phiflow\n",
|
||||||
|
"!pip install --upgrade --quiet git+https://github.com/tum-pbs/PhiFlow@develop\n",
|
||||||
"\n",
|
"\n",
|
||||||
"from phi.flow import *\n",
|
"from phi.flow import *\n",
|
||||||
"\n",
|
"\n",
|
||||||
|
|||||||
@@ -45,8 +45,8 @@
|
|||||||
},
|
},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"#!pip install --upgrade --quiet git+https://github.com/tum-pbs/PhiFlow@develop\n",
|
|
||||||
"#!pip install --upgrade --quiet phiflow \n",
|
"#!pip install --upgrade --quiet phiflow \n",
|
||||||
|
"!pip install --upgrade --quiet git+https://github.com/tum-pbs/PhiFlow@develop\n",
|
||||||
"\n",
|
"\n",
|
||||||
"from phi.flow import * # The Dash GUI is not supported on Google colab, ignore the warning\n",
|
"from phi.flow import * # The Dash GUI is not supported on Google colab, ignore the warning\n",
|
||||||
"import pylab"
|
"import pylab"
|
||||||
|
|||||||
Reference in New Issue
Block a user