{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "'tensorflow'" ] }, "execution_count": 1, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# Jupyter notebook started with command line flag\n", "# KERAS_BACKEND=tensorflow\n", "\n", "# since we have run keras_init.py at startup, \n", "# keras is already imported\n", "keras.backend.backend()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Now, the image dimension ordering is correctly set for TensorFlow:" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "'tf'" ] }, "execution_count": 2, "metadata": {}, "output_type": "execute_result" } ], "source": [ "keras.backend.image_dim_ordering()" ] } ], "metadata": { "kernelspec": { "display_name": "Python 2", "language": "python", "name": "python2" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 2 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython2", "version": "2.7.6" } }, "nbformat": 4, "nbformat_minor": 2 }