Created
July 10, 2018 12:03
-
-
Save fqx/1150d53b6db4bd375135a04b167f1aba to your computer and use it in GitHub Desktop.
intro_to_dl_init.ipynb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"nbformat": 4, | |
"nbformat_minor": 0, | |
"metadata": { | |
"colab": { | |
"name": "intro_to_dl_init.ipynb", | |
"version": "0.3.2", | |
"provenance": [], | |
"collapsed_sections": [], | |
"toc_visible": true, | |
"include_colab_link": true | |
}, | |
"kernelspec": { | |
"name": "python3", | |
"display_name": "Python 3" | |
}, | |
"accelerator": "GPU" | |
}, | |
"cells": [ | |
{ | |
"cell_type": "markdown", | |
"metadata": { | |
"id": "view-in-github", | |
"colab_type": "text" | |
}, | |
"source": [ | |
"[View in Colaboratory](https://colab.research.google.com/gist/fqx/1150d53b6db4bd375135a04b167f1aba/intro_to_dl_init.ipynb)" | |
] | |
}, | |
{ | |
"metadata": { | |
"id": "SqPuQy_XTIT6", | |
"colab_type": "text" | |
}, | |
"cell_type": "markdown", | |
"source": [ | |
"# Environment initiation" | |
] | |
}, | |
{ | |
"metadata": { | |
"id": "pFdLo90KRcvX", | |
"colab_type": "code", | |
"colab": {} | |
}, | |
"cell_type": "code", | |
"source": [ | |
"# upload requirements.txt and *.py\n", | |
"from google.colab import files\n", | |
"uploaded = files.upload()\n", | |
"for fn in uploaded.keys():\n", | |
" print('User uploaded file \"{name}\" with length {length} bytes'.format(name=fn, length=len(uploaded[fn])))" | |
], | |
"execution_count": 0, | |
"outputs": [] | |
}, | |
{ | |
"metadata": { | |
"id": "SUXXng9yRsCz", | |
"colab_type": "code", | |
"colab": {} | |
}, | |
"cell_type": "code", | |
"source": [ | |
"!pip install -q -r requirements.txt\n", | |
"!apt-get install -qq -y ffmpeg" | |
], | |
"execution_count": 0, | |
"outputs": [] | |
}, | |
{ | |
"metadata": { | |
"id": "cHQg7GSWwZ4a", | |
"colab_type": "code", | |
"colab": {} | |
}, | |
"cell_type": "code", | |
"source": [ | |
"import tensorflow as tf\n", | |
"print(tf.__version__)\n", | |
"print(tf.test.gpu_device_name())\n", | |
"!ffmpeg -version" | |
], | |
"execution_count": 0, | |
"outputs": [] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment