"<font size=\"4\" color=\"red\">This part of the notebook works correctly only on some advanced PyTorch versions (e.g. 0.4.0a0+410fd58), therefore is may not run correctly for you.</font>\n",
"<font size=\"4\" color=\"red\">This part of the notebook works correctly only on some advanced PyTorch versions (e.g. 0.4.0a0+410fd58), therefore is may not run correctly for you.</font><br><br>\n",
"Please also note that for generating a PNG image of the network (last cell of the notebook), you will need to have graphviz installed:\n",
" ```\n",
" $ sudo apt-get install graphviz\n",
" ```\n",
"<br>"
"<br>"
]
]
},
},
...
...
%% Cell type:markdown id: tags:
%% Cell type:markdown id: tags:
# Experimental
# Experimental
<br>
<br>
<fontsize="6"color="red">⚠ WARNING </font>
<fontsize="6"color="red">⚠ WARNING </font>
<br>
<br>
<fontsize="4"color="red">This part of the notebook works correctly only on some advanced PyTorch versions (e.g. 0.4.0a0+410fd58), therefore is may not run correctly for you.</font>
<fontsize="4"color="red">This part of the notebook works correctly only on some advanced PyTorch versions (e.g. 0.4.0a0+410fd58), therefore is may not run correctly for you.</font><br><br>
Please also note that for generating a PNG image of the network (last cell of the notebook), you will need to have graphviz installed:
```
$ sudo apt-get install graphviz
```
<br>
<br>
%% Cell type:code id: tags:
%% Cell type:code id: tags:
``` python
``` python
# Relative import of code from distiller, w/o installing the package
# Relative import of code from distiller, w/o installing the package
importos
importos
importsys
importsys
module_path=os.path.abspath(os.path.join('..'))
module_path=os.path.abspath(os.path.join('..'))
ifmodule_pathnotinsys.path:
ifmodule_pathnotinsys.path:
sys.path.append(module_path)
sys.path.append(module_path)
%matplotlibinline
%matplotlibinline
importmatplotlib
importmatplotlib
importnumpyasnp
importnumpyasnp
importmatplotlib.pyplotasplt
importmatplotlib.pyplotasplt
fromdistiller.model_summariesimport*
fromdistiller.model_summariesimport*
frommodelsimportcreate_model
frommodelsimportcreate_model
fromapputilsimport*
fromapputilsimport*
importtorch
importtorch
importtorchvision
importtorchvision
importqgrid
importqgrid
# Load some common jupyter code
# Load some common jupyter code
%rundistiller_jupyter_helpers.ipynb
%rundistiller_jupyter_helpers.ipynb
importipywidgetsaswidgets
importipywidgetsaswidgets
fromipywidgetsimportinteractive,interact,Layout
fromipywidgetsimportinteractive,interact,Layout
# Some models have long node names and require longer lines
# Some models have long node names and require longer lines