Skip to content

Commit

Permalink
Add pretrain notebook (#200)
Browse files Browse the repository at this point in the history
  • Loading branch information
Shashi456 authored and marco-c committed Jun 11, 2018
1 parent c13774c commit 80fd975
Showing 1 changed file with 247 additions and 0 deletions.
247 changes: 247 additions & 0 deletions pretrain.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,247 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {
"colab_type": "text",
"id": "JQwDy3kmIur6"
},
"source": [
"*Downloading git LFS*"
]
},
{
"cell_type": "code",
"execution_count": 0,
"metadata": {
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
},
"colab_type": "code",
"id": "lBcLdvOAFIfk"
},
"outputs": [],
"source": [
"!wget https://github.com/git-lfs/git-lfs/releases/download/v2.4.2/git-lfs-linux-amd64-2.4.2.tar.gz"
]
},
{
"cell_type": "markdown",
"metadata": {
"colab_type": "text",
"id": "uOPCNnc7Is5M"
},
"source": [
"*Extracting git LFS*"
]
},
{
"cell_type": "code",
"execution_count": 0,
"metadata": {
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
},
"colab_type": "code",
"id": "AFRCLSR9FUmu"
},
"outputs": [],
"source": [
"!tar xvf git-lfs-linux-amd64-2.4.2.tar.gz"
]
},
{
"cell_type": "markdown",
"metadata": {
"colab_type": "text",
"id": "x-Fid9IaI-J-"
},
"source": [
"*Installing git LFS*"
]
},
{
"cell_type": "code",
"execution_count": 0,
"metadata": {
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
},
"colab_type": "code",
"id": "L0P6khtrFXpW"
},
"outputs": [],
"source": [
"!cd git-lfs-2.4.2/ && ./install.sh"
]
},
{
"cell_type": "code",
"execution_count": 0,
"metadata": {
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
},
"colab_type": "code",
"id": "kgzSKuXUFZi0"
},
"outputs": [],
"source": [
"!git lfs install"
]
},
{
"cell_type": "markdown",
"metadata": {
"colab_type": "text",
"id": "nJ31i4Z8JHa8"
},
"source": [
"*Cloning the repository*"
]
},
{
"cell_type": "code",
"execution_count": 0,
"metadata": {
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
},
"colab_type": "code",
"id": "NPOQ5rFHFbnU"
},
"outputs": [],
"source": [
"!git lfs clone --recurse-submodules https://github.com/marco-c/autowebcompat.git"
]
},
{
"cell_type": "markdown",
"metadata": {
"colab_type": "text",
"id": "8E5K5gxGJKrW"
},
"source": [
"*Marking working directory*"
]
},
{
"cell_type": "code",
"execution_count": 0,
"metadata": {
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
},
"colab_type": "code",
"id": "GIxBvGGdFdoK"
},
"outputs": [],
"source": [
"import os\n",
"os.chdir('autowebcompat')"
]
},
{
"cell_type": "markdown",
"metadata": {
"colab_type": "text",
"id": "ugZB2EhbJOui"
},
"source": [
"*Installing requirements*"
]
},
{
"cell_type": "code",
"execution_count": 0,
"metadata": {
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
},
"colab_type": "code",
"id": "wBqw99O-FfTK"
},
"outputs": [],
"source": [
"!pip install selenium==3.4.3\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"colab_type": "text",
"id": "2HichwT2JR4W"
},
"source": [
"*Run the model*"
]
},
{
"cell_type": "code",
"execution_count": 0,
"metadata": {
"colab": {
"autoexec": {
"startup": false,
"wait_interval": 0
}
},
"colab_type": "code",
"id": "K8peoV51Fj4A"
},
"outputs": [],
"source": [
"!python3 pretrain.py -n=inception -o=adam "
]
}
],
"metadata": {
"colab": {
"default_view": {},
"name": "train.ipynb",
"provenance": [],
"version": "0.3.2",
"views": {}
},
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.5.5"
}
},
"nbformat": 4,
"nbformat_minor": 1
}

0 comments on commit 80fd975

Please sign in to comment.