Skip to content

Instantly share code, notes, and snippets.

@chrishokamp
Created August 6, 2015 16:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chrishokamp/1119013107e5088a69be to your computer and use it in GitHub Desktop.
Save chrishokamp/1119013107e5088a69be to your computer and use it in GitHub Desktop.
dataset shape is everything!
Display the source blob
Display the rendered blob
Raw
{"nbformat_minor": 0, "cells": [{"execution_count": 9, "cell_type": "code", "source": "import numpy\nimport theano\nimport logging\nfrom theano import tensor\nfrom blocks.bricks import Linear, Tanh\nfrom blocks.bricks.cost import SquaredError\nfrom blocks.initialization import IsotropicGaussian, Constant\nfrom blocks.monitoring import aggregation\nfrom blocks.algorithms import (GradientDescent, Scale,\n StepClipping, CompositeRule)\nfrom blocks.algorithms import AdaDelta\nfrom blocks.extensions.monitoring import TrainingDataMonitoring\nfrom blocks.main_loop import MainLoop\nfrom blocks.extensions import FinishAfter, Printing\nfrom blocks.bricks.recurrent import SimpleRecurrent\nfrom matplotlib import pyplot\nfrom fuel.datasets import IndexableDataset, IterableDataset\nfrom fuel.transformers import Mapping, Batch, Padding, Filter\nfrom collections import OrderedDict\nfrom blocks.graph import ComputationGraph\nfrom fuel.transformers import Batch\nfrom fuel.schemes import ConstantScheme\nfrom blocks.filter import VariableFilter\nfrom blocks.extensions import SimpleExtension\nfrom blocks.model import Model\nfrom blocks.bricks import WEIGHT", "outputs": [], "metadata": {"collapsed": true, "trusted": true}}, {"execution_count": 36, "cell_type": "code", "source": "\"\"\"\nThis is a simple example of Vanilla RNN applied on a toy example dataset.\nThe task is a \"simple memorization task\". The network input has a shape of\n(15, 2) and the output is another sequence with a shape of (15, 2).\nThus, we have 2 input signals and 2 output signals (each with a length of 15).\nOutput signals are same as input signals but with 2 and 4 time-steps\ndelay respectively.\n\nOutput_0_at_time_step[t] = Input_0_at_time_step[t-2]\nOutput_1_at_time_step[t] = Input_1_at_time_step[t-4]\n\nChris: some updates and modifications made for monitoring\n\n\"\"\"\n\ndef main(dataset, n_h, n_y, batch_size, dev_split, n_epochs):\n # Building Model\n orig_u = tensor.tensor3('input_sequence')\n # split so that we can monitor performance on dev data\n u = orig_u[:, :dev_split]\n \n input_to_state = Linear(name='input_to_state',\n input_dim=seq_u.shape[-1],\n output_dim=n_h)\n u_transform = input_to_state.apply(u)\n RNN = SimpleRecurrent(activation=Tanh(),\n dim=n_h, name=\"RNN\")\n h = RNN.apply(u_transform) # h is hidden states in the RNN\n \n state_to_output = Linear(name='state_to_output',\n input_dim=n_h,\n output_dim=seq_y.shape[-1])\n \n y_hat = state_to_output.apply(h)\n y_hat.name = 'yhat_sequence'\n \n # Cost\n orig_y = tensor.tensor3('target_sequence')\n y = orig_y[:, :dev_split]\n cost = SquaredError().apply(y, y_hat)\n \n cost_cg = ComputationGraph(cost)\n weights = VariableFilter(roles=[WEIGHT])(cost_cg.variables)\n\n # add some regularization\n # L2 norm sum as regularization\n # blocks also has l2_norm(tensors): implemented in `theano_expressions`\n cost = cost + tensor.sum([(0.005 * W**2).sum() for W in weights])\n cost.name = 'regularized_MSE'\n \n # split out some dev data so we can monitor performance\n dev_y = orig_y[:, dev_split:]\n dev_x = orig_u[:, dev_split:]\n dev_transform = input_to_state.apply(dev_x)\n dev_h = RNN.apply(dev_transform)\n dev_y_hat = state_to_output.apply(dev_h)\n dev_mse = SquaredError().apply(dev_y, dev_y_hat)\n \n dev_mse = aggregation.mean(dev_mse, 5)\n dev_mse.name = 'dev_MSE'\n # end dev data monitoring\n\n # Initialization\n for brick in (RNN, state_to_output, input_to_state):\n brick.weights_init = IsotropicGaussian(0.01)\n brick.biases_init = Constant(0)\n brick.initialize()\n\n stream = dataset.get_example_stream()\n stream = Batch(stream, iteration_scheme=ConstantScheme(batch_size))\n \n cg = ComputationGraph(cost)\n\n test_model = Model(cost)\n\n # Training\n algorithm = GradientDescent(cost=cost, parameters=cg.parameters,\n step_rule=CompositeRule([StepClipping(10.0), Scale(0.01)])) \n\n # sanity check to manually look at the predictions on y_train\n# zip_test = tensor.concatenate([y_hat, y], axis=2)\n# zip_test.name = 'zip_test'\n observables = [cost, dev_mse]\n monitor = TrainingDataMonitoring(observables,\n prefix=\"train\")\n \n main_loop = MainLoop(\n model=test_model,\n data_stream=stream, \n algorithm=algorithm,\n extensions=[monitor,\n TrainingDataMonitoring(observables, after_batch=True),\n FinishAfter(after_n_epochs=n_epochs),\n Printing(every_n_batches=100, after_epoch=False)]) \n\n main_loop.run()", "outputs": [], "metadata": {"collapsed": false, "trusted": true}}, {"execution_count": 37, "cell_type": "code", "source": "# THEANO DEBUGGING\nfrom blocks import config\nconfig.recursion_limit = 100000\nfloatX = theano.config.floatX\nlogger = logging.getLogger(__name__)\n# this is to let the log print in the notebook\nlogger.setLevel(logging.DEBUG)\n\ntheano.config.optimizer='fast_compile'\n# theano.config.optimizer='None'\ntheano.config.exception_verbosity='high'", "outputs": [], "metadata": {"collapsed": false, "trusted": true}}, {"execution_count": 39, "cell_type": "code", "source": "logging.basicConfig(level=logging.INFO)\n\nn_examples = 100\nn_u = 2 # input vector size\nn_h = 10 # hidden vector size\nn_y = 2 # output vector size\ntime_steps = 5 # number of time-steps in time\nn_seq = 10 # number of sequences for training\n\nnumpy.random.seed(0)\n\n# generating random sequences\nseq_u = numpy.random.randn(time_steps, n_examples, n_u).astype(theano.config.floatX)\nseq_y = numpy.zeros((time_steps, n_examples, n_y)).astype(theano.config.floatX)\n\nseq_y[1:] = seq_u[:-1] # 2 time-step delay\n# seq_y[:, 4:, 1] = seq_u[:, :-4, 1] # 4 time-step delay\n\ndataset = IndexableDataset(indexables=OrderedDict([('input_sequence', seq_u), ('target_sequence', seq_y)]))\n# split each batch 80/20 train/dev (see the main function)s\nbatch_size = 20\ndev_split = 16\nmain(dataset, n_h, n_y, batch_size, dev_split, 5000)", "outputs": [{"output_type": "stream", "name": "stdout", "text": "provides_sources\n('input_sequence', 'target_sequence')\n\n-------------------------------------------------------------------------------\nBEFORE FIRST EPOCH\n-------------------------------------------------------------------------------\nTraining status:\n\t batch_interrupt_received: False\n\t epoch_interrupt_received: False\n\t epoch_started: True\n\t epochs_done: 0\n\t iterations_done: 0\n\t received_first_batch: False\n\t resumed_from: None\n\t training_started: True\nLog records from the iteration 0:\n\n\n-------------------------------------------------------------------------------\n-------------------------------------------------------------------------------\nTraining status:\n\t batch_interrupt_received: False\n\t epoch_interrupt_received: False\n\t epoch_started: True\n\t epochs_done: 99\n\t iterations_done: 100\n\t received_first_batch: True\n\t resumed_from: None\n\t training_started: True\nLog records from the iteration 100:\n\t dev_MSE: 13.5080337524\n\t regularized_MSE: 11.8649101257\n\n\n-------------------------------------------------------------------------------\n-------------------------------------------------------------------------------\nTraining status:\n\t batch_interrupt_received: False\n\t epoch_interrupt_received: False\n\t epoch_started: True\n\t epochs_done: 199\n\t iterations_done: 200\n\t received_first_batch: True\n\t resumed_from: None\n\t training_started: True\nLog records from the iteration 200:\n\t dev_MSE: 7.09689712524\n\t regularized_MSE: 4.86173915863\n\n\n-------------------------------------------------------------------------------\n-------------------------------------------------------------------------------\nTraining status:\n\t batch_interrupt_received: False\n\t epoch_interrupt_received: False\n\t epoch_started: True\n\t epochs_done: 299\n\t iterations_done: 300\n\t received_first_batch: True\n\t resumed_from: None\n\t training_started: True\nLog records from the iteration 300:\n\t dev_MSE: 2.12194395065\n\t regularized_MSE: 1.22668266296\n\n\n-------------------------------------------------------------------------------\n-------------------------------------------------------------------------------\nTraining status:\n\t batch_interrupt_received: False\n\t epoch_interrupt_received: False\n\t epoch_started: True\n\t epochs_done: 399\n\t iterations_done: 400\n\t received_first_batch: True\n\t resumed_from: None\n\t training_started: True\nLog records from the iteration 400:\n\t dev_MSE: 0.361874520779\n\t regularized_MSE: 0.222101271152\n\n\n-------------------------------------------------------------------------------\n-------------------------------------------------------------------------------\nTraining status:\n\t batch_interrupt_received: False\n\t epoch_interrupt_received: False\n\t epoch_started: True\n\t epochs_done: 499\n\t iterations_done: 500\n\t received_first_batch: True\n\t resumed_from: None\n\t training_started: True\nLog records from the iteration 500:\n\t dev_MSE: 0.25397118926\n\t regularized_MSE: 0.154260456562\n\n\n-------------------------------------------------------------------------------\n-------------------------------------------------------------------------------\nTraining status:\n\t batch_interrupt_received: False\n\t epoch_interrupt_received: False\n\t epoch_started: True\n\t epochs_done: 599\n\t iterations_done: 600\n\t received_first_batch: True\n\t resumed_from: None\n\t training_started: True\nLog records from the iteration 600:\n\t dev_MSE: 0.204578354955\n\t regularized_MSE: 0.128003165126\n\n\n-------------------------------------------------------------------------------\n-------------------------------------------------------------------------------\nTraining status:\n\t batch_interrupt_received: False\n\t epoch_interrupt_received: False\n\t epoch_started: True\n\t epochs_done: 699\n\t iterations_done: 700\n\t received_first_batch: True\n\t resumed_from: None\n\t training_started: True\nLog records from the iteration 700:\n\t dev_MSE: 0.177278995514\n\t regularized_MSE: 0.114789456129\n\n\n-------------------------------------------------------------------------------\n-------------------------------------------------------------------------------\nTraining status:\n\t batch_interrupt_received: False\n\t epoch_interrupt_received: False\n\t epoch_started: True\n\t epochs_done: 799\n\t iterations_done: 800\n\t received_first_batch: True\n\t resumed_from: None\n\t training_started: True\nLog records from the iteration 800:\n\t dev_MSE: 0.160219699144\n\t regularized_MSE: 0.107174694538\n\n\n-------------------------------------------------------------------------------\n-------------------------------------------------------------------------------\nTraining status:\n\t batch_interrupt_received: False\n\t epoch_interrupt_received: False\n\t epoch_started: True\n\t epochs_done: 899\n\t iterations_done: 900\n\t received_first_batch: True\n\t resumed_from: None\n\t training_started: True\nLog records from the iteration 900:\n\t dev_MSE: 0.148452922702\n\t regularized_MSE: 0.102345719934\n\n\n-------------------------------------------------------------------------------\n-------------------------------------------------------------------------------\nTraining status:\n\t batch_interrupt_received: False\n\t epoch_interrupt_received: False\n\t epoch_started: True\n\t epochs_done: 999\n\t iterations_done: 1000\n\t received_first_batch: True\n\t resumed_from: None\n\t training_started: True\nLog records from the iteration 1000:\n\t dev_MSE: 0.139722898602\n\t regularized_MSE: 0.0990384966135\n\n\n-------------------------------------------------------------------------------\n-------------------------------------------------------------------------------\nTraining status:\n\t batch_interrupt_received: False\n\t epoch_interrupt_received: False\n\t epoch_started: True\n\t epochs_done: 1099\n\t iterations_done: 1100\n\t received_first_batch: True\n\t resumed_from: None\n\t training_started: True\nLog records from the iteration 1100:\n\t dev_MSE: 0.132940605283\n\t regularized_MSE: 0.0966390669346\n\n\n-------------------------------------------------------------------------------\n-------------------------------------------------------------------------------\nTraining status:\n\t batch_interrupt_received: False\n\t epoch_interrupt_received: False\n\t epoch_started: True\n\t epochs_done: 1199\n\t iterations_done: 1200\n\t received_first_batch: True\n\t resumed_from: None\n\t training_started: True\nLog records from the iteration 1200:\n\t dev_MSE: 0.12752379477\n\t regularized_MSE: 0.0948243439198\n\n\n-------------------------------------------------------------------------------\n-------------------------------------------------------------------------------\nTraining status:\n\t batch_interrupt_received: False\n\t epoch_interrupt_received: False\n\t epoch_started: True\n\t epochs_done: 1299\n\t iterations_done: 1300\n\t received_first_batch: True\n\t resumed_from: None\n\t training_started: True\nLog records from the iteration 1300:\n\t dev_MSE: 0.123121201992\n\t regularized_MSE: 0.0934087634087\n\n\n-------------------------------------------------------------------------------\n-------------------------------------------------------------------------------\nTraining status:\n\t batch_interrupt_received: False\n\t epoch_interrupt_received: False\n\t epoch_started: True\n\t epochs_done: 1399\n\t iterations_done: 1400\n\t received_first_batch: True\n\t resumed_from: None\n\t training_started: True\nLog records from the iteration 1400:\n\t dev_MSE: 0.119499243796\n\t regularized_MSE: 0.0922771468759\n\n\n-------------------------------------------------------------------------------\n-------------------------------------------------------------------------------\nTraining status:\n\t batch_interrupt_received: False\n\t epoch_interrupt_received: False\n\t epoch_started: True\n\t epochs_done: 1499\n\t iterations_done: 1500\n\t received_first_batch: True\n\t resumed_from: None\n\t training_started: True\nLog records from the iteration 1500:\n\t dev_MSE: 0.116492845118\n\t regularized_MSE: 0.091353841126\n\n\n-------------------------------------------------------------------------------\n-------------------------------------------------------------------------------\nTraining status:\n\t batch_interrupt_received: False\n\t epoch_interrupt_received: False\n\t epoch_started: True\n\t epochs_done: 1599\n\t iterations_done: 1600\n\t received_first_batch: True\n\t resumed_from: None\n\t training_started: True\nLog records from the iteration 1600:\n\t dev_MSE: 0.11398024857\n\t regularized_MSE: 0.0905869156122\n\n\n-------------------------------------------------------------------------------\n-------------------------------------------------------------------------------\nTraining status:\n\t batch_interrupt_received: False\n\t epoch_interrupt_received: False\n\t epoch_started: True\n\t epochs_done: 1699\n\t iterations_done: 1700\n\t received_first_batch: True\n\t resumed_from: None\n\t training_started: True\nLog records from the iteration 1700:\n\t dev_MSE: 0.11186940968\n\t regularized_MSE: 0.0899395942688\n\n\n-------------------------------------------------------------------------------\n-------------------------------------------------------------------------------\nTraining status:\n\t batch_interrupt_received: False\n\t epoch_interrupt_received: False\n\t epoch_started: True\n\t epochs_done: 1799\n\t iterations_done: 1800\n\t received_first_batch: True\n\t resumed_from: None\n\t training_started: True\nLog records from the iteration 1800:\n\t dev_MSE: 0.110089421272\n\t regularized_MSE: 0.0893851071596\n\n\n-------------------------------------------------------------------------------\n-------------------------------------------------------------------------------\nTraining status:\n\t batch_interrupt_received: False\n\t epoch_interrupt_received: False\n\t epoch_started: True\n\t epochs_done: 1899\n\t iterations_done: 1900\n\t received_first_batch: True\n\t resumed_from: None\n\t training_started: True\nLog records from the iteration 1900:\n\t dev_MSE: 0.108584322035\n\t regularized_MSE: 0.088903658092\n\n\n-------------------------------------------------------------------------------\n-------------------------------------------------------------------------------\nTraining status:\n\t batch_interrupt_received: False\n\t epoch_interrupt_received: False\n\t epoch_started: True\n\t epochs_done: 1999\n\t iterations_done: 2000\n\t received_first_batch: True\n\t resumed_from: None\n\t training_started: True\nLog records from the iteration 2000:\n\t dev_MSE: 0.107310011983\n\t regularized_MSE: 0.0884803831577\n\n\n-------------------------------------------------------------------------------\n-------------------------------------------------------------------------------\nTraining status:\n\t batch_interrupt_received: False\n\t epoch_interrupt_received: False\n\t epoch_started: True\n\t epochs_done: 2099\n\t iterations_done: 2100\n\t received_first_batch: True\n\t resumed_from: None\n\t training_started: True\nLog records from the iteration 2100:\n\t dev_MSE: 0.106230653822\n\t regularized_MSE: 0.088103890419\n\n\n-------------------------------------------------------------------------------\n-------------------------------------------------------------------------------\nTraining status:\n\t batch_interrupt_received: False\n\t epoch_interrupt_received: False\n\t epoch_started: True\n\t epochs_done: 2199\n\t iterations_done: 2200\n\t received_first_batch: True\n\t resumed_from: None\n\t training_started: True\nLog records from the iteration 2200:\n\t dev_MSE: 0.105317190289\n\t regularized_MSE: 0.0877654701471\n\n\n-------------------------------------------------------------------------------\n-------------------------------------------------------------------------------\nTraining status:\n\t batch_interrupt_received: False\n\t epoch_interrupt_received: False\n\t epoch_started: True\n\t epochs_done: 2299\n\t iterations_done: 2300\n\t received_first_batch: True\n\t resumed_from: None\n\t training_started: True\nLog records from the iteration 2300:\n\t dev_MSE: 0.104545637965\n\t regularized_MSE: 0.0874583050609\n\n\n-------------------------------------------------------------------------------\n-------------------------------------------------------------------------------\nTraining status:\n\t batch_interrupt_received: False\n\t epoch_interrupt_received: False\n\t epoch_started: True\n\t epochs_done: 2399\n\t iterations_done: 2400\n\t received_first_batch: True\n\t resumed_from: None\n\t training_started: True\nLog records from the iteration 2400:\n\t dev_MSE: 0.103896401823\n\t regularized_MSE: 0.0871771126986\n\n\n-------------------------------------------------------------------------------\n-------------------------------------------------------------------------------\nTraining status:\n\t batch_interrupt_received: False\n\t epoch_interrupt_received: False\n\t epoch_started: True\n\t epochs_done: 2499\n\t iterations_done: 2500\n\t received_first_batch: True\n\t resumed_from: None\n\t training_started: True\nLog records from the iteration 2500:\n\t dev_MSE: 0.103352807462\n\t regularized_MSE: 0.0869176164269\n\n\n-------------------------------------------------------------------------------\n-------------------------------------------------------------------------------\nTraining status:\n\t batch_interrupt_received: False\n\t epoch_interrupt_received: False\n\t epoch_started: True\n\t epochs_done: 2599\n\t iterations_done: 2600\n\t received_first_batch: True\n\t resumed_from: None\n\t training_started: True\nLog records from the iteration 2600:\n\t dev_MSE: 0.102900899947\n\t regularized_MSE: 0.0866765379906\n\n\n-------------------------------------------------------------------------------\n-------------------------------------------------------------------------------\nTraining status:\n\t batch_interrupt_received: False\n\t epoch_interrupt_received: False\n\t epoch_started: True\n\t epochs_done: 2699\n\t iterations_done: 2700\n\t received_first_batch: True\n\t resumed_from: None\n\t training_started: True\nLog records from the iteration 2700:\n\t dev_MSE: 0.102529071271\n\t regularized_MSE: 0.0864511057734\n\n\n-------------------------------------------------------------------------------\n-------------------------------------------------------------------------------\nTraining status:\n\t batch_interrupt_received: False\n\t epoch_interrupt_received: False\n\t epoch_started: True\n\t epochs_done: 2799\n\t iterations_done: 2800\n\t received_first_batch: True\n\t resumed_from: None\n\t training_started: True\nLog records from the iteration 2800:\n\t dev_MSE: 0.102227129042\n\t regularized_MSE: 0.0862391591072\n\n\n-------------------------------------------------------------------------------\n-------------------------------------------------------------------------------\nTraining status:\n\t batch_interrupt_received: False\n\t epoch_interrupt_received: False\n\t epoch_started: True\n\t epochs_done: 2899\n\t iterations_done: 2900\n\t received_first_batch: True\n\t resumed_from: None\n\t training_started: True\nLog records from the iteration 2900:\n\t dev_MSE: 0.101986512542\n\t regularized_MSE: 0.0860389322042\n\n\n-------------------------------------------------------------------------------\n-------------------------------------------------------------------------------\nTraining status:\n\t batch_interrupt_received: False\n\t epoch_interrupt_received: False\n\t epoch_started: True\n\t epochs_done: 2999\n\t iterations_done: 3000\n\t received_first_batch: True\n\t resumed_from: None\n\t training_started: True\nLog records from the iteration 3000:\n\t dev_MSE: 0.101799800992\n\t regularized_MSE: 0.0858489498496\n\n\n-------------------------------------------------------------------------------\n-------------------------------------------------------------------------------\nTraining status:\n\t batch_interrupt_received: False\n\t epoch_interrupt_received: False\n\t epoch_started: True\n\t epochs_done: 3099\n\t iterations_done: 3100\n\t received_first_batch: True\n\t resumed_from: None\n\t training_started: True\nLog records from the iteration 3100:\n\t dev_MSE: 0.101660646498\n\t regularized_MSE: 0.085667937994\n\n\n-------------------------------------------------------------------------------\n-------------------------------------------------------------------------------\nTraining status:\n\t batch_interrupt_received: False\n\t epoch_interrupt_received: False\n\t epoch_started: True\n\t epochs_done: 3199\n\t iterations_done: 3200\n\t received_first_batch: True\n\t resumed_from: None\n\t training_started: True\nLog records from the iteration 3200:\n\t dev_MSE: 0.101563438773\n\t regularized_MSE: 0.085494928062\n\n\n-------------------------------------------------------------------------------\n-------------------------------------------------------------------------------\nTraining status:\n\t batch_interrupt_received: False\n\t epoch_interrupt_received: False\n\t epoch_started: True\n\t epochs_done: 3299\n\t iterations_done: 3300\n\t received_first_batch: True\n\t resumed_from: None\n\t training_started: True\nLog records from the iteration 3300:\n\t dev_MSE: 0.101503290236\n\t regularized_MSE: 0.0853290036321\n\n\n-------------------------------------------------------------------------------\n-------------------------------------------------------------------------------\nTraining status:\n\t batch_interrupt_received: False\n\t epoch_interrupt_received: False\n\t epoch_started: True\n\t epochs_done: 3399\n\t iterations_done: 3400\n\t received_first_batch: True\n\t resumed_from: None\n\t training_started: True\nLog records from the iteration 3400:\n\t dev_MSE: 0.101475939155\n\t regularized_MSE: 0.0851695239544\n\n\n-------------------------------------------------------------------------------\n-------------------------------------------------------------------------------\nTraining status:\n\t batch_interrupt_received: False\n\t epoch_interrupt_received: False\n\t epoch_started: True\n\t epochs_done: 3499\n\t iterations_done: 3500\n\t received_first_batch: True\n\t resumed_from: None\n\t training_started: True\nLog records from the iteration 3500:\n\t dev_MSE: 0.101477742195\n\t regularized_MSE: 0.0850157439709\n\n\n-------------------------------------------------------------------------------\n-------------------------------------------------------------------------------\nTraining status:\n\t batch_interrupt_received: False\n\t epoch_interrupt_received: False\n\t epoch_started: True\n\t epochs_done: 3599\n\t iterations_done: 3600\n\t received_first_batch: True\n\t resumed_from: None\n\t training_started: True\nLog records from the iteration 3600:\n\t dev_MSE: 0.101505383849\n\t regularized_MSE: 0.0848672240973\n\n\n-------------------------------------------------------------------------------\n-------------------------------------------------------------------------------\nTraining status:\n\t batch_interrupt_received: False\n\t epoch_interrupt_received: False\n\t epoch_started: True\n\t epochs_done: 3699\n\t iterations_done: 3700\n\t received_first_batch: True\n\t resumed_from: None\n\t training_started: True\nLog records from the iteration 3700:\n\t dev_MSE: 0.101555943489\n\t regularized_MSE: 0.0847234278917\n\n\n-------------------------------------------------------------------------------\n-------------------------------------------------------------------------------\nTraining status:\n\t batch_interrupt_received: False\n\t epoch_interrupt_received: False\n\t epoch_started: True\n\t epochs_done: 3799\n\t iterations_done: 3800\n\t received_first_batch: True\n\t resumed_from: None\n\t training_started: True\nLog records from the iteration 3800:\n\t dev_MSE: 0.101626895368\n\t regularized_MSE: 0.0845839828253\n\n\n-------------------------------------------------------------------------------\n-------------------------------------------------------------------------------\nTraining status:\n\t batch_interrupt_received: False\n\t epoch_interrupt_received: False\n\t epoch_started: True\n\t epochs_done: 3899\n\t iterations_done: 3900\n\t received_first_batch: True\n\t resumed_from: None\n\t training_started: True\nLog records from the iteration 3900:\n\t dev_MSE: 0.101715922356\n\t regularized_MSE: 0.0844485014677\n\n\n-------------------------------------------------------------------------------\n-------------------------------------------------------------------------------\nTraining status:\n\t batch_interrupt_received: False\n\t epoch_interrupt_received: False\n\t epoch_started: True\n\t epochs_done: 3999\n\t iterations_done: 4000\n\t received_first_batch: True\n\t resumed_from: None\n\t training_started: True\nLog records from the iteration 4000:\n\t dev_MSE: 0.101821102202\n\t regularized_MSE: 0.0843167379498\n\n\n-------------------------------------------------------------------------------\n-------------------------------------------------------------------------------\nTraining status:\n\t batch_interrupt_received: False\n\t epoch_interrupt_received: False\n\t epoch_started: True\n\t epochs_done: 4099\n\t iterations_done: 4100\n\t received_first_batch: True\n\t resumed_from: None\n\t training_started: True\nLog records from the iteration 4100:\n\t dev_MSE: 0.10194054991\n\t regularized_MSE: 0.0841883420944\n\n\n-------------------------------------------------------------------------------\n-------------------------------------------------------------------------------\nTraining status:\n\t batch_interrupt_received: False\n\t epoch_interrupt_received: False\n\t epoch_started: True\n\t epochs_done: 4199\n\t iterations_done: 4200\n\t received_first_batch: True\n\t resumed_from: None\n\t training_started: True\nLog records from the iteration 4200:\n\t dev_MSE: 0.102072641253\n\t regularized_MSE: 0.0840631425381\n\n\n-------------------------------------------------------------------------------\n-------------------------------------------------------------------------------\nTraining status:\n\t batch_interrupt_received: False\n\t epoch_interrupt_received: False\n\t epoch_started: True\n\t epochs_done: 4299\n\t iterations_done: 4300\n\t received_first_batch: True\n\t resumed_from: None\n\t training_started: True\nLog records from the iteration 4300:\n\t dev_MSE: 0.102216146886\n\t regularized_MSE: 0.0839408785105\n\n\n-------------------------------------------------------------------------------\n-------------------------------------------------------------------------------\nTraining status:\n\t batch_interrupt_received: False\n\t epoch_interrupt_received: False\n\t epoch_started: True\n\t epochs_done: 4399\n\t iterations_done: 4400\n\t received_first_batch: True\n\t resumed_from: None\n\t training_started: True\nLog records from the iteration 4400:\n\t dev_MSE: 0.102369591594\n\t regularized_MSE: 0.0838213562965\n\n\n-------------------------------------------------------------------------------\n-------------------------------------------------------------------------------\nTraining status:\n\t batch_interrupt_received: False\n\t epoch_interrupt_received: False\n\t epoch_started: True\n\t epochs_done: 4499\n\t iterations_done: 4500\n\t received_first_batch: True\n\t resumed_from: None\n\t training_started: True\nLog records from the iteration 4500:\n\t dev_MSE: 0.102531991899\n\t regularized_MSE: 0.0837044119835\n\n\n-------------------------------------------------------------------------------\n-------------------------------------------------------------------------------\nTraining status:\n\t batch_interrupt_received: False\n\t epoch_interrupt_received: False\n\t epoch_started: True\n\t epochs_done: 4599\n\t iterations_done: 4600\n\t received_first_batch: True\n\t resumed_from: None\n\t training_started: True\nLog records from the iteration 4600:\n\t dev_MSE: 0.102702356875\n\t regularized_MSE: 0.083589926362\n\n\n-------------------------------------------------------------------------------\n-------------------------------------------------------------------------------\nTraining status:\n\t batch_interrupt_received: False\n\t epoch_interrupt_received: False\n\t epoch_started: True\n\t epochs_done: 4699\n\t iterations_done: 4700\n\t received_first_batch: True\n\t resumed_from: None\n\t training_started: True\nLog records from the iteration 4700:\n\t dev_MSE: 0.102879799902\n\t regularized_MSE: 0.0834776908159\n\n\n-------------------------------------------------------------------------------\n-------------------------------------------------------------------------------\nTraining status:\n\t batch_interrupt_received: False\n\t epoch_interrupt_received: False\n\t epoch_started: True\n\t epochs_done: 4799\n\t iterations_done: 4800\n\t received_first_batch: True\n\t resumed_from: None\n\t training_started: True\nLog records from the iteration 4800:\n\t dev_MSE: 0.103063389659\n\t regularized_MSE: 0.0833676457405\n\n\n-------------------------------------------------------------------------------\n-------------------------------------------------------------------------------\nTraining status:\n\t batch_interrupt_received: False\n\t epoch_interrupt_received: False\n\t epoch_started: True\n\t epochs_done: 4899\n\t iterations_done: 4900\n\t received_first_batch: True\n\t resumed_from: None\n\t training_started: True\nLog records from the iteration 4900:\n\t dev_MSE: 0.103252470493\n\t regularized_MSE: 0.0832596421242\n\n\n-------------------------------------------------------------------------------\n-------------------------------------------------------------------------------\nTraining status:\n\t batch_interrupt_received: False\n\t epoch_interrupt_received: False\n\t epoch_started: True\n\t epochs_done: 4999\n\t iterations_done: 5000\n\t received_first_batch: True\n\t resumed_from: None\n\t training_started: True\nLog records from the iteration 5000:\n\t dev_MSE: 0.103446319699\n\t regularized_MSE: 0.0831536352634\n\n\n-------------------------------------------------------------------------------\nTRAINING HAS BEEN FINISHED:\n-------------------------------------------------------------------------------\nTraining status:\n\t batch_interrupt_received: False\n\t epoch_interrupt_received: False\n\t epoch_started: False\n\t epochs_done: 5000\n\t iterations_done: 5000\n\t received_first_batch: True\n\t resumed_from: None\n\t training_started: True\nLog records from the iteration 5000:\n\t dev_MSE: 0.103446319699\n\t regularized_MSE: 0.0831536352634\n\t training_finish_requested: True\n\t training_finished: True\n\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"execution_count": null, "cell_type": "code", "source": "", "outputs": [], "metadata": {"collapsed": true, "trusted": true}}], "nbformat": 4, "metadata": {"kernelspec": {"display_name": "Python 2", "name": "python2", "language": "python"}, "language_info": {"mimetype": "text/x-python", "nbconvert_exporter": "python", "version": "2.7.10", "name": "python", "file_extension": ".py", "pygments_lexer": "ipython2", "codemirror_mode": {"version": 2, "name": "ipython"}}}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment