Skip to content

Commit

Permalink
updates to metadata and colab notebook info (#3)
Browse files Browse the repository at this point in the history
* removed old files

* removed older files

* updated readme to link to colab notebooks

* added runtimes and colab links to notebooks
  • Loading branch information
timsainb committed May 14, 2019
1 parent 6f57b45 commit 9f6f428
Show file tree
Hide file tree
Showing 11 changed files with 743 additions and 1,580 deletions.
67 changes: 49 additions & 18 deletions 0.0-Autoencoder-fashion-mnist.ipynb
@@ -1,26 +1,51 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/timsainb/tensorflow2-generative-models/blob/master/0.0-Autoencoder-fashion-mnist.ipynb)\n",
"## Autoencoder (AE) \n",
"\n",
"A simple autoencoder network.\n",
"\n",
"![an autoencoder](imgs/ae.png)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Install packages if in colab"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"ExecuteTime": {
"end_time": "2019-05-13T20:25:33.485257Z",
"start_time": "2019-05-13T20:25:33.480589Z"
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"env: CUDA_VISIBLE_DEVICES=1\n"
]
}
],
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# make visible the only one GPU\n",
"%env CUDA_VISIBLE_DEVICES=1"
"### install necessary packages if in colab\n",
"def run_subprocess_command(cmd):\n",
" process = subprocess.Popen(cmd.split(), stdout=subprocess.PIPE)\n",
" for line in process.stdout:\n",
" print(line.decode().strip())\n",
"\n",
"\n",
"import sys, subprocess\n",
"\n",
"IN_COLAB = \"google.colab\" in sys.modules\n",
"colab_requirements = [\"pip install tf-nightly-gpu-2.0-preview==2.0.0.dev20190513\"]\n",
"if IN_COLAB:\n",
" for i in colab_requirements:\n",
" run_subprocess_command(i)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### load packages"
]
},
{
Expand Down Expand Up @@ -427,6 +452,12 @@
}
],
"metadata": {
"accelerator": "GPU",
"colab": {
"collapsed_sections": [],
"provenance": [],
"toc_visible": true
},
"kernelspec": {
"display_name": "Python 3",
"language": "python",
Expand Down
70 changes: 52 additions & 18 deletions 1.0-Variational-Autoencoder-fashion-mnist.ipynb
@@ -1,26 +1,54 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/timsainb/tensorflow2-generative-models/blob/master/1.0-Variational-Autoencoder-fashion-mnist.ipynb)\n",
"## Variational Autoencoder (VAE) ([article](https://arxiv.org/abs/1312.6114)) \n",
"\n",
"The original variational autoencoder network, using [tensorflow_probability](https://github.com/tensorflow/probability)\n",
"\n",
"![variational autoencoder](imgs/vae.png)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Install packages if in colab"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"ExecuteTime": {
"end_time": "2019-05-10T19:17:26.655302Z",
"start_time": "2019-05-10T19:17:26.651848Z"
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"env: CUDA_VISIBLE_DEVICES=1\n"
]
}
],
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"### install necessary packages if in colab\n",
"def run_subprocess_command(cmd):\n",
" process = subprocess.Popen(cmd.split(), stdout=subprocess.PIPE)\n",
" for line in process.stdout:\n",
" print(line.decode().strip())\n",
"\n",
"\n",
"import sys, subprocess\n",
"\n",
"IN_COLAB = \"google.colab\" in sys.modules\n",
"colab_requirements = [\n",
" \"pip install tf-nightly-gpu-2.0-preview==2.0.0.dev20190513\",\n",
" \"pip install tfp-nightly==0.7.0.dev20190508\",\n",
"]\n",
"if IN_COLAB:\n",
" for i in colab_requirements:\n",
" run_subprocess_command(i)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# make visible the only one GPU\n",
"%env CUDA_VISIBLE_DEVICES=1"
"### load packages"
]
},
{
Expand Down Expand Up @@ -465,6 +493,12 @@
}
],
"metadata": {
"accelerator": "GPU",
"colab": {
"collapsed_sections": [],
"provenance": [],
"toc_visible": true
},
"kernelspec": {
"display_name": "Python 3",
"language": "python",
Expand Down

0 comments on commit 9f6f428

Please sign in to comment.