The core data structure of Keras is a model, a way to organize layers. The main type of model is the Sequential model, a linear stack of layers.\n" - ] - }, - { - "cell_type": "markdown", - "metadata": { - "deletable": true, - "editable": true - }, - "source": [ - "What we did here is stacking a Fully Connected (Dense) layer of trainable weights from the input to the output and an Activation layer on top of the weights layer." - ] - }, - { - "cell_type": "markdown", - "metadata": { - "deletable": true, - "editable": true - }, - "source": [ - "##### Dense" - ] - }, - { - "cell_type": "markdown", - "metadata": { - "collapsed": true, - "deletable": true, - "editable": true - }, - "source": [ - "```python\n", - "from keras.layers.core import Dense\n", - "\n", - "Dense(units, activation=None, use_bias=True, \n", - " kernel_initializer='glorot_uniform', bias_initializer='zeros', \n", - " kernel_regularizer=None, bias_regularizer=None, \n", - " activity_regularizer=None, kernel_constraint=None, bias_constraint=None)\n", - "```" - ] - }, - { - "cell_type": "markdown", - "metadata": { - "deletable": true, - "editable": true - }, - "source": [ - "* `units`: int > 0.\n", - "\n", - "* `init`: name of initialization function for the weights of the layer (see initializations), or alternatively, Theano function to use for weights initialization. This parameter is only relevant if you don't pass a weights argument.\n", - "\n", - "* `activation`: name of activation function to use (see activations), or alternatively, elementwise Theano function. If you don't specify anything, no activation is applied (ie. \"linear\" activation: a(x) = x).\n", - "\n", - "* `weights`: list of Numpy arrays to set as initial weights. The list should have 2 elements, of shape (input_dim, output_dim) and (output_dim,) for weights and biases respectively.\n", - "\n", - "* `kernel_regularizer`: instance of WeightRegularizer (eg. L1 or L2 regularization), applied to the main weights matrix.\n", - "\n", - "* `bias_regularizer`: instance of WeightRegularizer, applied to the bias.\n", - "\n", - "* `activity_regularizer`: instance of ActivityRegularizer, applied to the network output.\n", - "\n", - "* `kernel_constraint`: instance of the constraints module (eg. maxnorm, nonneg), applied to the main weights matrix.\n", - "\n", - "* `bias_constraint`: instance of the constraints module, applied to the bias.\n", - "\n", - "* `use_bias`: whether to include a bias (i.e. make the layer affine rather than linear)." - ] - }, - { - "cell_type": "markdown", - "metadata": { - "deletable": true, - "editable": true - }, - "source": [ - "## (some) others `keras.core.layers`" - ] - }, - { - "cell_type": "markdown", - "metadata": { - "deletable": true, - "editable": true - }, - "source": [ - "* `keras.layers.core.Flatten()`\n", - "* `keras.layers.core.Reshape(target_shape)`\n", - "* `keras.layers.core.Permute(dims)`\n", - "\n", - "```python\n", - "model = Sequential()\n", - "model.add(Permute((2, 1), input_shape=(10, 64)))\n", - "# now: model.output_shape == (None, 64, 10)\n", - "# note: `None` is the batch dimension\n", - "```\n", - "\n", - "* `keras.layers.core.Lambda(function, output_shape=None, arguments=None)`\n", - "* `keras.layers.core.ActivityRegularization(l1=0.0, l2=0.0)`" - ] - }, - { - "cell_type": "markdown", - "metadata": { - "deletable": true, - "editable": true - }, - "source": [ - "\n", - "\n", - "Credits: Yam Peleg ([@Yampeleg](https://twitter.com/yampeleg))" - ] - }, - { - "cell_type": "markdown", - "metadata": { - "deletable": true, - "editable": true - }, - "source": [ - "##### Activation" - ] - }, - { - "cell_type": "markdown", - "metadata": { - "collapsed": true, - "deletable": true, - "editable": true - }, - "source": [ - "```python\n", - "from keras.layers.core import Activation\n", - "\n", - "Activation(activation)\n", - "```" - ] - }, - { - "cell_type": "markdown", - "metadata": { - "deletable": true, - "editable": true - }, - "source": [ - "**Supported Activations** : [https://keras.io/activations/]\n", - "\n", - "**Advanced Activations**: [https://keras.io/layers/advanced-activations/]" - ] - }, - { - "cell_type": "markdown", - "metadata": { - "deletable": true, - "editable": true - }, - "source": [ - "##### Optimizer" - ] - }, - { - "cell_type": "markdown", - "metadata": { - "deletable": true, - "editable": true - }, - "source": [ - "If you need to, you can further configure your optimizer. A core principle of Keras is to make things reasonably simple, while allowing the user to be fully in control when they need to (the ultimate control being the easy extensibility of the source code).\n", - "Here we used SGD (stochastic gradient descent) as an optimization algorithm for our trainable weights. " - ] - }, - { - "cell_type": "markdown", - "metadata": { - "deletable": true, - "editable": true - }, - "source": [ - "\n", - "\n", - "Source & Reference: http://sebastianruder.com/content/images/2016/09/saddle_point_evaluation_optimizers.gif" - ] - }, - { - "cell_type": "markdown", - "metadata": { - "deletable": true, - "editable": true - }, - "source": [ - "\"Data Sciencing\" this example a little bit more\n", - "=====" - ] - }, - { - "cell_type": "markdown", - "metadata": { - "deletable": true, - "editable": true - }, - "source": [ - "What we did here is nice, however in the real world it is not useable because of overfitting.\n", - "Lets try and solve it with cross validation." - ] - }, - { - "cell_type": "markdown", - "metadata": { - "deletable": true, - "editable": true - }, - "source": [ - "##### Overfitting" - ] - }, - { - "cell_type": "markdown", - "metadata": { - "deletable": true, - "editable": true - }, - "source": [ - "In overfitting, a statistical model describes random error or noise instead of the underlying relationship. Overfitting occurs when a model is excessively complex, such as having too many parameters relative to the number of observations. \n", - "\n", - "A model that has been overfit has poor predictive performance, as it overreacts to minor fluctuations in the training data." - ] - }, - { - "cell_type": "markdown", - "metadata": { - "collapsed": false, - "deletable": true, - "editable": true - }, - "source": [ - "\n", - "" - ] - }, - { - "cell_type": "markdown", - "metadata": { - "deletable": true, - "editable": true - }, - "source": [ - "
To avoid overfitting, we will first split out data to training set and test set and test out model on the test set.\n", - "Next: we will use two of keras's callbacks EarlyStopping and ModelCheckpoint" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "---" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Let's see first the model we implemented" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "_________________________________________________________________\n", - "Layer (type) Output Shape Param # \n", - "=================================================================\n", - "dense_2 (Dense) (None, 9) 846 \n", - "_________________________________________________________________\n", - "activation_2 (Activation) (None, 9) 0 \n", - "=================================================================\n", - "Total params: 846.0\n", - "Trainable params: 846.0\n", - "Non-trainable params: 0.0\n", - "_________________________________________________________________\n" - ] - } - ], - "source": [ - "model.summary()" - ] - }, - { - "cell_type": "code", - "execution_count": 8, - "metadata": { - "collapsed": true - }, - "outputs": [], - "source": [ - "from sklearn.model_selection import train_test_split\n", - "from keras.callbacks import EarlyStopping, ModelCheckpoint" - ] - }, - { - "cell_type": "code", - "execution_count": 11, - "metadata": { - "collapsed": false, - "deletable": true, - "editable": true - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Train on 52596 samples, validate on 9282 samples\n", - "Epoch 1/20\n", - "52596/52596 [==============================] - 0s - loss: 0.6634 - val_loss: 0.6561\n", - "Epoch 2/20\n", - "52596/52596 [==============================] - 0s - loss: 0.6626 - val_loss: 0.6562\n", - "Epoch 3/20\n", - "52596/52596 [==============================] - 0s - loss: 0.6619 - val_loss: 0.6562\n", - "Epoch 4/20\n", - "52596/52596 [==============================] - 0s - loss: 0.6613 - val_loss: 0.6562\n", - "Epoch 5/20\n", - "52596/52596 [==============================] - 0s - loss: 0.6607 - val_loss: 0.6561\n", - "Epoch 6/20\n", - "52596/52596 [==============================] - 0s - loss: 0.6601 - val_loss: 0.6557\n", - "Epoch 7/20\n", - "52596/52596 [==============================] - 0s - loss: 0.6596 - val_loss: 0.6554\n", - "Epoch 8/20\n", - "52596/52596 [==============================] - 0s - loss: 0.6591 - val_loss: 0.6551\n", - "Epoch 9/20\n", - "52596/52596 [==============================] - 0s - loss: 0.6586 - val_loss: 0.6550\n", - "Epoch 10/20\n", - "52596/52596 [==============================] - 0s - loss: 0.6582 - val_loss: 0.6548\n", - "Epoch 11/20\n", - "52596/52596 [==============================] - 0s - loss: 0.6577 - val_loss: 0.6545\n", - "Epoch 12/20\n", - "52596/52596 [==============================] - 0s - loss: 0.6572 - val_loss: 0.6544\n", - "Epoch 13/20\n", - "52596/52596 [==============================] - 0s - loss: 0.6568 - val_loss: 0.6541\n", - "Epoch 14/20\n", - "52596/52596 [==============================] - 1s - loss: 0.6563 - val_loss: 0.6538\n", - "Epoch 15/20\n", - "52596/52596 [==============================] - 0s - loss: 0.6559 - val_loss: 0.6534\n", - "Epoch 16/20\n", - "52596/52596 [==============================] - 1s - loss: 0.6555 - val_loss: 0.6533\n", - "Epoch 17/20\n", - "52596/52596 [==============================] - 0s - loss: 0.6551 - val_loss: 0.6534\n", - "Epoch 18/20\n", - "52596/52596 [==============================] - 0s - loss: 0.6548 - val_loss: 0.6529\n", - "Epoch 19/20\n", - "52596/52596 [==============================] - 0s - loss: 0.6544 - val_loss: 0.6525\n", - "Epoch 20/20\n", - "52596/52596 [==============================] - 0s - loss: 0.6540 - val_loss: 0.6523\n" - ] - }, - { - "data": { - "text/plain": [ - "
The core data structure of Keras is a model, a way to organize layers. The main type of model is the Sequential model, a linear stack of layers.\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "What we did here is stacking a Fully Connected (Dense) layer of trainable weights from the input to the output and an Activation layer on top of the weights layer." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##### Dense" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "```python\n", + "from keras.layers.core import Dense\n", + "\n", + "Dense(units, activation=None, use_bias=True, \n", + " kernel_initializer='glorot_uniform', bias_initializer='zeros', \n", + " kernel_regularizer=None, bias_regularizer=None, \n", + " activity_regularizer=None, kernel_constraint=None, bias_constraint=None)\n", + "```" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "* `units`: int > 0.\n", + "\n", + "* `init`: name of initialization function for the weights of the layer (see initializations), or alternatively, Theano function to use for weights initialization. This parameter is only relevant if you don't pass a weights argument.\n", + "\n", + "* `activation`: name of activation function to use (see activations), or alternatively, elementwise Theano function. If you don't specify anything, no activation is applied (ie. \"linear\" activation: a(x) = x).\n", + "\n", + "* `weights`: list of Numpy arrays to set as initial weights. The list should have 2 elements, of shape (input_dim, output_dim) and (output_dim,) for weights and biases respectively.\n", + "\n", + "* `kernel_regularizer`: instance of WeightRegularizer (eg. L1 or L2 regularization), applied to the main weights matrix.\n", + "\n", + "* `bias_regularizer`: instance of WeightRegularizer, applied to the bias.\n", + "\n", + "* `activity_regularizer`: instance of ActivityRegularizer, applied to the network output.\n", + "\n", + "* `kernel_constraint`: instance of the constraints module (eg. maxnorm, nonneg), applied to the main weights matrix.\n", + "\n", + "* `bias_constraint`: instance of the constraints module, applied to the bias.\n", + "\n", + "* `use_bias`: whether to include a bias (i.e. make the layer affine rather than linear)." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## (some) others `keras.core.layers`" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "* `keras.layers.core.Flatten()`\n", + "* `keras.layers.core.Reshape(target_shape)`\n", + "* `keras.layers.core.Permute(dims)`\n", + "\n", + "```python\n", + "model = Sequential()\n", + "model.add(Permute((2, 1), input_shape=(10, 64)))\n", + "# now: model.output_shape == (None, 64, 10)\n", + "# note: `None` is the batch dimension\n", + "```\n", + "\n", + "* `keras.layers.core.Lambda(function, output_shape=None, arguments=None)`\n", + "* `keras.layers.core.ActivityRegularization(l1=0.0, l2=0.0)`" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n", + "\n", + "Credits: Yam Peleg ([@Yampeleg](https://twitter.com/yampeleg))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##### Activation" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "```python\n", + "from keras.layers.core import Activation\n", + "\n", + "Activation(activation)\n", + "```" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "**Supported Activations** : [https://keras.io/activations/]\n", + "\n", + "**Advanced Activations**: [https://keras.io/layers/advanced-activations/]" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##### Optimizer" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "If you need to, you can further configure your optimizer. A core principle of Keras is to make things reasonably simple, while allowing the user to be fully in control when they need to (the ultimate control being the easy extensibility of the source code).\n", + "Here we used SGD (stochastic gradient descent) as an optimization algorithm for our trainable weights. " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n", + "\n", + "Source & Reference: http://sebastianruder.com/content/images/2016/09/saddle_point_evaluation_optimizers.gif" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\"Data Sciencing\" this example a little bit more\n", + "=====" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "What we did here is nice, however in the real world it is not useable because of overfitting.\n", + "Lets try and solve it with cross validation." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##### Overfitting" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "In overfitting, a statistical model describes random error or noise instead of the underlying relationship. Overfitting occurs when a model is excessively complex, such as having too many parameters relative to the number of observations. \n", + "\n", + "A model that has been overfit has poor predictive performance, as it overreacts to minor fluctuations in the training data." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n", + "" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "
To avoid overfitting, we will first split out data to training set and test set and test out model on the test set.\n", + "Next: we will use two of keras's callbacks EarlyStopping and ModelCheckpoint" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "---" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Let's see first the model we implemented" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "_________________________________________________________________\n", + "Layer (type) Output Shape Param # \n", + "=================================================================\n", + "dense_1 (Dense) (None, 9) 846 \n", + "_________________________________________________________________\n", + "activation_1 (Activation) (None, 9) 0 \n", + "=================================================================\n", + "Total params: 846\n", + "Trainable params: 846\n", + "Non-trainable params: 0\n", + "_________________________________________________________________\n" + ] + } + ], + "source": [ + "model.summary()" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [ + "from sklearn.model_selection import train_test_split\n", + "from keras.callbacks import EarlyStopping, ModelCheckpoint" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Train on 52596 samples, validate on 9282 samples\n", + "Epoch 1/50\n", + "52596/52596 [==============================] - 1s - loss: 1.6516 - val_loss: 1.6513\n", + "Epoch 2/50\n", + "52596/52596 [==============================] - 0s - loss: 1.6501 - val_loss: 1.6499\n", + "Epoch 3/50\n", + "52596/52596 [==============================] - 1s - loss: 1.6488 - val_loss: 1.6486\n", + "Epoch 4/50\n", + "52596/52596 [==============================] - 1s - loss: 1.6474 - val_loss: 1.6473\n", + "Epoch 5/50\n", + "52596/52596 [==============================] - 0s - loss: 1.6462 - val_loss: 1.6461\n", + "Epoch 6/50\n", + "52596/52596 [==============================] - 0s - loss: 1.6449 - val_loss: 1.6448\n", + "Epoch 7/50\n", + "52596/52596 [==============================] - 0s - loss: 1.6437 - val_loss: 1.6437\n", + "Epoch 8/50\n", + "52596/52596 [==============================] - 0s - loss: 1.6425 - val_loss: 1.6425\n", + "Epoch 9/50\n", + "52596/52596 [==============================] - 0s - loss: 1.6414 - val_loss: 1.6414\n", + "Epoch 10/50\n", + "52596/52596 [==============================] - 0s - loss: 1.6403 - val_loss: 1.6403\n", + "Epoch 11/50\n", + "52596/52596 [==============================] - 0s - loss: 1.6392 - val_loss: 1.6393\n", + "Epoch 12/50\n", + "52596/52596 [==============================] - 0s - loss: 1.6382 - val_loss: 1.6383\n", + "Epoch 13/50\n", + "52596/52596 [==============================] - 1s - loss: 1.6372 - val_loss: 1.6373\n", + "Epoch 14/50\n", + "52596/52596 [==============================] - 0s - loss: 1.6362 - val_loss: 1.6363\n", + "Epoch 15/50\n", + "52596/52596 [==============================] - 0s - loss: 1.6352 - val_loss: 1.6354\n", + "Epoch 16/50\n", + "52596/52596 [==============================] - 0s - loss: 1.6343 - val_loss: 1.6345\n", + "Epoch 17/50\n", + "52596/52596 [==============================] - 0s - loss: 1.6334 - val_loss: 1.6336\n", + "Epoch 18/50\n", + "52596/52596 [==============================] - 0s - loss: 1.6325 - val_loss: 1.6327\n", + "Epoch 19/50\n", + "52596/52596 [==============================] - 0s - loss: 1.6316 - val_loss: 1.6319\n", + "Epoch 20/50\n", + "52596/52596 [==============================] - 0s - loss: 1.6308 - val_loss: 1.6311\n", + "Epoch 21/50\n", + "52596/52596 [==============================] - 0s - loss: 1.6300 - val_loss: 1.6303\n", + "Epoch 22/50\n", + "52596/52596 [==============================] - 0s - loss: 1.6292 - val_loss: 1.6295\n", + "Epoch 23/50\n", + "52596/52596 [==============================] - 0s - loss: 1.6284 - val_loss: 1.6287\n", + "Epoch 24/50\n", + "52596/52596 [==============================] - 0s - loss: 1.6276 - val_loss: 1.6280\n", + "Epoch 25/50\n", + "52596/52596 [==============================] - 0s - loss: 1.6269 - val_loss: 1.6273\n", + "Epoch 26/50\n", + "52596/52596 [==============================] - 0s - loss: 1.6262 - val_loss: 1.6265\n", + "Epoch 27/50\n", + "52596/52596 [==============================] - 0s - loss: 1.6254 - val_loss: 1.6258\n", + "Epoch 28/50\n", + "52596/52596 [==============================] - 0s - loss: 1.6247 - val_loss: 1.6252\n", + "Epoch 29/50\n", + "52596/52596 [==============================] - 0s - loss: 1.6241 - val_loss: 1.6245\n", + "Epoch 30/50\n", + "52596/52596 [==============================] - 0s - loss: 1.6234 - val_loss: 1.6238\n", + "Epoch 31/50\n", + "52596/52596 [==============================] - 0s - loss: 1.6227 - val_loss: 1.6232\n", + "Epoch 32/50\n", + "52596/52596 [==============================] - 0s - loss: 1.6221 - val_loss: 1.6226\n", + "Epoch 33/50\n", + "52596/52596 [==============================] - 0s - loss: 1.6215 - val_loss: 1.6220\n", + "Epoch 34/50\n", + "52596/52596 [==============================] - 1s - loss: 1.6209 - val_loss: 1.6214\n", + "Epoch 35/50\n", + "52596/52596 [==============================] - 0s - loss: 1.6203 - val_loss: 1.6208\n", + "Epoch 36/50\n", + "52596/52596 [==============================] - 0s - loss: 1.6197 - val_loss: 1.6202\n", + "Epoch 37/50\n", + "52596/52596 [==============================] - 0s - loss: 1.6191 - val_loss: 1.6197\n", + "Epoch 38/50\n", + "52596/52596 [==============================] - 0s - loss: 1.6186 - val_loss: 1.6191\n", + "Epoch 39/50\n", + "52596/52596 [==============================] - 0s - loss: 1.6180 - val_loss: 1.6186\n", + "Epoch 40/50\n", + "52596/52596 [==============================] - 0s - loss: 1.6175 - val_loss: 1.6181\n", + "Epoch 41/50\n", + "52596/52596 [==============================] - 0s - loss: 1.6170 - val_loss: 1.6175\n", + "Epoch 42/50\n", + "52596/52596 [==============================] - 0s - loss: 1.6165 - val_loss: 1.6170\n", + "Epoch 43/50\n", + "52596/52596 [==============================] - 0s - loss: 1.6160 - val_loss: 1.6166\n", + "Epoch 44/50\n", + "52596/52596 [==============================] - 0s - loss: 1.6155 - val_loss: 1.6161\n", + "Epoch 45/50\n", + "52596/52596 [==============================] - 0s - loss: 1.6150 - val_loss: 1.6156\n", + "Epoch 46/50\n", + "52596/52596 [==============================] - 0s - loss: 1.6145 - val_loss: 1.6151\n", + "Epoch 47/50\n", + "52596/52596 [==============================] - 0s - loss: 1.6141 - val_loss: 1.6147\n", + "Epoch 48/50\n", + "52596/52596 [==============================] - 0s - loss: 1.6136 - val_loss: 1.6142\n", + "Epoch 49/50\n", + "52596/52596 [==============================] - 0s - loss: 1.6132 - val_loss: 1.6138\n", + "Epoch 50/50\n", + "52596/52596 [==============================] - 0s - loss: 1.6127 - val_loss: 1.6134\n" + ] + }, + { + "data": { + "text/plain": [ + "
Conv2D
layer with\n",
- " data_format=\"channels_first\"
,\n",
- " set axis=1
in BatchNormalization
.beta
to normalized tensor.\n",
- " If False, beta
is ignored.gamma
.\n",
- " If False, gamma
is not used.\n",
- " When the next layer is linear (also e.g. nn.relu
),\n",
- " this can be disabled since the scaling\n",
- " will be done by the next layer.\\n\"+\n", + " \"BokehJS does not appear to have successfully loaded. If loading BokehJS from CDN, this \\n\"+\n", + " \"may be due to a slow or bad network connection. Possible fixes:\\n\"+\n", + " \"
\\n\"+\n", + " \"\\n\"+\n",
+ " \"from bokeh.resources import INLINE\\n\"+\n",
+ " \"output_notebook(resources=INLINE)\\n\"+\n",
+ " \"
\\n\"+\n",
+ " \"