diff --git a/dl-model-training/devcloud/.ipynb_checkpoints/Deep_Learning_Tutorial-checkpoint.ipynb b/dl-model-training/devcloud/.ipynb_checkpoints/Deep_Learning_Tutorial-checkpoint.ipynb deleted file mode 100644 index da4ca35a..00000000 --- a/dl-model-training/devcloud/.ipynb_checkpoints/Deep_Learning_Tutorial-checkpoint.ipynb +++ /dev/null @@ -1,572 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "\n", - "\n", - "# Deep Learning Tutorial\n", - "\n", - "\n", - "## MNIST Database - Handwritten digits (0-9)'\n", - "\n", - "\n", - "On this tutorial we will use Python* to implement one Convolutional Neural Network - a simplified version of LeNet - that will recognized Handwritten digits. A project like this one, using the MNIST dataset is considered as the \"Hello World\" of Machine Learning.\n", - "\n", - "We will use Keras*, TensorFlow* and the MNIST database.\n", - "\n", - "According to the description on their website, \"Keras is a high-level neural networks API, written in Python and capable of running on top of TensorFlow, CNTK, or Theano. It was developed with a focus on enabling fast experimentation. Being able to go from idea to result with the least possible delay is key to doing good research.\"*\n", - "\n", - "We will use TensorFlow as the backend for Keras. TensorFlow is an open source software library for high performance numerical computation.\n", - "\n", - "The MNIST database is a large database of handwritten digits that is commonly used for training various image processing systems. MNIST database is also available as a Keras dataset, with 60k 28x28 images of the 10 digits along with a test set of 10k images, so it is very easy to import and use it on our code.\n", - "\n", - "One good visual and interactive reference on what we are developing can be found here. The basic difference between our code and this interactive sample is the number and size of convolutional and fully-connected layers (LeNet uses two of each, we will use a single one, to reduce training time). We also adjusted the layers size to balance between accuracy and training time. We are achieving 98,54% of accuracy with less than 2 minutes training time on an Intel® Core™ processor.\n", - "\n", - "This code can also be optimized by several ways to increase accuracy, and we would like to invite you to explore this later, changing the number of epochs, filters, fully-connected neurons and also including additional convolutional and fully connected layers. You can also use flattening, dropout and batch normalization layers. Other optimization techniques can also be applied, so feel free to use this tutorial code as a base to explore those optimization techniques.\n", - "\n", - "In a nutshell, the convolutional and pooling layers are responsible for extracting a set of features from the input images, and the fully-connected layers are responsible for classification.\n", - "\n", - "Convolutional layers applies a set of filters to the input image to extract important features from the image. The filters are small matrixes also called image kernels that can be repeatedly applied to the input image (\"sliding\" the filter on the image). You may already used those filters on traditional image processing applications such as GIMP (i.e. blurring, sharpening or embossing). This article gives a good overview on image kernels with some live experiments. Each filter will generate a new image that will be the input for the next layer, typically a pooling layer.\n", - "\n", - "Pooling layers reduces the spatial size of the image (downsampling), reducing the computation in the network and also controlling overfitting.\n", - "\n", - "Fully connected layers are traditional Neural Network layers.\n", - "\n", - "\n", - "## Installing the Python* libraries\n", - "\n", - "To install the necessary Python libraries on Linux, you need to run:" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Collecting keras\n", - " Downloading https://files.pythonhosted.org/packages/5e/10/aa32dad071ce52b5502266b5c659451cfd6ffcbf14e6c8c4f16c0ff5aaab/Keras-2.2.4-py2.py3-none-any.whl (312kB)\n", - "\u001b[K 100% |████████████████████████████████| 317kB 3.1MB/s eta 0:00:01\n", - "\u001b[?25hCollecting tensorflow\n", - " Downloading https://files.pythonhosted.org/packages/7c/fb/7b2c5b3e85ad335b53ca67deb2ef4af574dc0a8759f43b7f45e15005e449/tensorflow-1.14.0-cp35-cp35m-manylinux1_x86_64.whl (109.2MB)\n", - "\u001b[K 100% |████████████████████████████████| 109.2MB 13kB/s eta 0:00:01 29% |█████████▌ | 32.2MB 27.3MB/s eta 0:00:03 53% |█████████████████ | 58.0MB 29.3MB/s eta 0:00:02 70% |██████████████████████▊ | 77.5MB 30.5MB/s eta 0:00:02 86% |███████████████████████████▊ | 94.4MB 15.7MB/s eta 0:00:01 94% |██████████████████████████████▏ | 102.9MB 15.5MB/s eta 0:00:01 96% |██████████████████████████████▉ | 105.2MB 16.2MB/s eta 0:00:01\n", - "\u001b[?25hCollecting pyyaml (from keras)\n", - " Downloading https://files.pythonhosted.org/packages/e3/e8/b3212641ee2718d556df0f23f78de8303f068fe29cdaa7a91018849582fe/PyYAML-5.1.2.tar.gz (265kB)\n", - "\u001b[K 100% |████████████████████████████████| 266kB 3.1MB/s eta 0:00:01\n", - "\u001b[?25hCollecting six>=1.9.0 (from keras)\n", - " Downloading https://files.pythonhosted.org/packages/73/fb/00a976f728d0d1fecfe898238ce23f502a721c0ac0ecfedb80e0d88c64e9/six-1.12.0-py2.py3-none-any.whl\n", - "Collecting keras-preprocessing>=1.0.5 (from keras)\n", - " Downloading https://files.pythonhosted.org/packages/28/6a/8c1f62c37212d9fc441a7e26736df51ce6f0e38455816445471f10da4f0a/Keras_Preprocessing-1.1.0-py2.py3-none-any.whl (41kB)\n", - "\u001b[K 100% |████████████████████████████████| 51kB 3.8MB/s eta 0:00:01\n", - "\u001b[?25hCollecting h5py (from keras)\n", - " Downloading https://files.pythonhosted.org/packages/4c/77/c4933e12dca0f61bcdafc207c7532e1250b8d12719459fd85132f3daa9fd/h5py-2.9.0-cp35-cp35m-manylinux1_x86_64.whl (2.8MB)\n", - "\u001b[K 100% |████████████████████████████████| 2.8MB 372kB/s eta 0:00:01\n", - "\u001b[?25hCollecting scipy>=0.14 (from keras)\n", - " Downloading https://files.pythonhosted.org/packages/14/49/8f13fa215e10a7ab0731cc95b0e9bb66cf83c6a98260b154cfbd0b55fb19/scipy-1.3.0-cp35-cp35m-manylinux1_x86_64.whl (25.1MB)\n", - "\u001b[K 40% |█████████████ | 10.2MB 28.9MB/s eta 0:00:01" - ] - } - ], - "source": [ - "! pip3 install keras tensorflow" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "\n", - " \n", - "## Run the tutorial\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "! python3 Deep_Learning_Tutorial.py" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - " \n", - "\n", - "## How the tutorial code works\n", - "\n", - "The complete code for this tutorial can be found here\n", - "Importing the necessary objects from Keras*\n", - "\n", - "\n", - "Sequential Network Model:" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "from keras.models import Sequential" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "\n", - "\n", - "\n", - "## Core Layers:\n", - "\n", - "Dense: densely-connected NN layer, to be used as classification layer\n", - "Flatten: layer to flatten the convolutional layers\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "from keras.layers import Dense, Flatten" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "\n", - " \n", - "\n", - "## Convolutional Layers:\n", - "\n", - "Conv2D: 2D convolution Layer\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "from keras.layers import Conv2D" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "\n", - " \n", - " \n", - "## Pooling Layer:\n", - "\n", - "MaxPooling2D: Max pooling operation for spatial data\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "from keras.layers import MaxPooling2D" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "\n", - " \n", - "### Utilities:" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "from keras.utils import np_utils" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "\n", - "\n", - " \n", - "\n", - "### MNIST Dataset:\n", - "\n", - "Dataset of 60,000 28x28 handwritten images of the 10 digits, along with a test set of 10,000 images.\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "from keras.datasets import mnist" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "\n", - " \n", - " \n", - "\n", - "## Download and load the MNIST database\n", - "\n", - "This will load the MNIST Dataset on four different variables:\n", - "\n", - " train_set: Dataset with the training data (60k elements)\n", - " train_classes: Dataset with the equivalent training classes (60k elements)\n", - " test_dataset: Dataset with test data (10k elements)\n", - " test_classes: Dataset with the equivalent test classes (10k elements)\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "(train_dataset, train_classes),(test_dataset, test_classes) = mnist.load_data()" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "\n", - "\n", - " \n", - "\n", - "- NOTE: only on the first run on your machine, this will download the MNIST Dataset.\n", - "Adjust the datasets to TensorFlow*\n", - "\n", - "First step, we need to reduce the image channels, from 3 (color) to 1 (grayscale):" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "train_dataset = train_dataset.reshape(train_dataset.shape[0], 28, 28, 1)\n", - "test_dataset = test_dataset.reshape(test_dataset.shape[0], 28, 28, 1)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "\n", - " \n", - "Second step, we will convert the data from int8 to float32:" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "train_dataset = train_dataset.astype('float32')\n", - "test_dataset = test_dataset.astype('float32')" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "\n", - " \n", - "Third step, we need to normalize the data to speed up processing time:" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "train_dataset = train_dataset / 255\n", - "test_dataset = test_dataset / 255" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "\n", - " \n", - "Forth step, convert the classes data from numerical to categorical:" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "train_classes = np_utils.to_categorical(train_classes, 10)\n", - "test_classes = np_utils.to_categorical(test_classes, 10)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "\n", - " \n", - "\n", - "Now the data is ready to be processed by the CNN.\n", - "\n", - "\n", - "## Create our Convolutional Neural Network (CNN)\n", - "\n", - "It is very simple and easy to create Neural Networks with Keras. We basically create the network, add the necessary layers, compile and execute the training.\n", - "\n", - "First thing is to create a Sequential Neural Network:" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "cnn = Sequential()" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "\n", - "We now add the input layer, a 2D convolutional layer with 32 filters, 3x3 filter kernel size, input shape of 28 x 28 x 1 (as we adjusted on the training dataset) and using Rectified Linear Unit (relu) as the activation function." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "cnn.add(Conv2D(32, (3,3), input_shape = (28, 28, 1), activation = 'relu'))" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "\n", - " \n", - "NOTE: We need to inform the input_shape parameter only if the convolutional layer is the input layer (first CNN layer). If you add another layers later on, you don't need to use this parameter.\n", - "\n", - "We add one Pooling layer using the default 2x2 size. This means that this layer will reduce by half the input image in both spatial dimentions.\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "cnn.add(MaxPooling2D())" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "\n", - " \n", - " \n", - "\n", - "At this point, a traditional LeNet network would add another two layers, one convolutional and one pooling, basically repeating the two lines of code we just created, (removing the input_shape from the first one). As explained before, to speed processing time and make it more easy to understand, we decided to use just the two layers we just created.\n", - "
\n", - "\n", - "Now we need to convert the output of the polling layer from a matrix to a vector, to be used by the classification part of our neural network. We do that using on flattening layer:" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "cnn.add(Flatten())" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "\n", - " \n", - " \n", - "\n", - "Our data is now ready for the classification part of our neural network, that will be implemented using just two layers, one hidden layer and one output layer.\n", - "\n", - "\n", - "The first classification layer will be a fully-connected layer with 128 neurons and using rectified linear unit as the activation function." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "cnn.add(Dense(units = 128, activation = 'relu'))" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "\n", - "\n", - "We now add another fully-connected layer that will be our output layer. Please note that this layer has 10 neurons, because we have 10 classes on our dataset. The activation function user here is Softmax." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "cnn.add(Dense(units = 10, activation = 'softmax'))" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - " \n", - " \n", - "\n", - "Before we train the model, we need to \"compile\" it to configure the learning process.\n", - "\n", - "We will compile the CNN using categorical crossentropy as the loss function, adam as the optimizer and using accuracy as the results evaluation metric that will be show on the end of each apoch and also on the end of the training process." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "cnn.compile(loss = 'categorical_crossentropy', optimizer = 'adam', metrics = ['accuracy'])" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "\n", - " \n", - " \n", - " NOTE: Adam is a gradient descent optimization algorithm. A good introduction to Adam can be found here.\n", - "\n", - "Our CNN is now ready to be trained.\n", - "\n", - "\n", - "## Training our CNN\n", - "\n", - "To train the CNN we call the Fit method. On this training we will define:\n", - "\n", - "- Training dataset and training classes: our training dataset and training classes adjusted on the beginning of this tutorial.\n", - "- Batch size: number of samples to be used per each gradient update, in our case, 128 (default is 32).\n", - "- epochs: number of epochs that will be used on the training, in our case, 5 (for time saving purposes).\n", - "- validation_data: the dataset used to validate the training on the end of each epoch. Here is where we inform out test dataset.\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "cnn.fit(train_dataset, train_classes, batch_size = 128, epochs = 5, validation_data = (test_dataset, test_classes))" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "\n", - "\n", - " \n", - "\n", - "It will take a few minutes to run, and it will inform you the progress on the console. Note that it will inform the evolution of the loss (loss:) and accuracy (acc:) during the execution of each epoch, and this data is computed using the training data, so it cannot be used to evaluate the improvement of the epoch on the overall accuracy.\n", - "\n", - "\n", - "At the end of each epoch, Keras will use the test dataset we provided to evaluate the epoch results, and this data will be displayed as val_loss: and val_acc: and those are good parameters to follow on each epoch to see how the accuracy improves. In general, the more epochs you run, more accuracy you will have (and more time you will need to run the training), but increasing the number of epochs is just one drop on the ocean of possibilities we have to optimize our CNN.\n", - "\n", - "## Evaluating the training results\n", - "\n", - "The simplest way to evaluate the training results is to use the evaluate method. It will show the same data as we saw on val_loss and val_acc on the end of the last epoch, but now we can use this data. On our tutorial, we will just print it on the console:" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "result = cnn.evaluate(test_dataset, test_classes)\n", - "print ('Accuracy = ' + str(result[1] * 100) + \"%\")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "\n", - " \n", - "To have detailed information about our network accuracy for each class, we can use one confusion matrix (a.k.a error matrix). Scikit-learn library can be used to do that and more information about it can be found here. We will not implement the confusion matrix on this tutorial, but there are several online samples on how to create a confusion matrix using Keras and Scikit-learn and also on how to interpret the results." - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3 (Ubuntu)", - "language": "python", - "name": "c003-python_3" - }, - "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.2" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/dl-model-training/devcloud/Deep_Learning_Tutorial.ipynb b/dl-model-training/devcloud/Deep_Learning_Tutorial.ipynb index b2f8aebe..c2d75e93 100644 --- a/dl-model-training/devcloud/Deep_Learning_Tutorial.ipynb +++ b/dl-model-training/devcloud/Deep_Learning_Tutorial.ipynb @@ -35,24 +35,78 @@ "Fully connected layers are traditional Neural Network layers.\n", "\n", "\n", - "## Installing the Python* libraries\n", + "## Installing the Python* libraries and steps to be followed\n", "\n", - "To install the necessary Python libraries on Linux, you need to run:" + "To run the exercise on devcloud, you need to do some preliminary steps to install the dependencies. Open a terminal and execute the following steps :- \n", + "\n", + "- rm -rf ~/.local/\n", + "\n", + "- If you get permission denied error while executing the above step, change the permissions of the file and then delete it\n", + "\n", + "- If you get the message Device or Resource busy while executing step a.), execute lsof +D /path which lists the open files with their process id's..Then you can use kill -9 pid to kill that process.\n", + "\n", + "\n", + " After executing the above steps, you will get Kernel error. To solve this restart the kernel from the main page.\n", + "\n", + " After executing pip3 install keras tensorflow as shown in the next steps , again restart the kernel to avoid import errors.\n" ] }, { "cell_type": "code", "execution_count": 1, - "metadata": {}, + "metadata": { + "scrolled": true + }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "Traceback (most recent call last):\r\n", - " File \"/usr/bin/pip3\", line 9, in \r\n", - " from pip import main\r\n", - "ImportError: cannot import name 'main'\r\n" + "Collecting keras\n", + " Using cached https://files.pythonhosted.org/packages/1b/18/2e1ef121e5560ac24c7ac9e363aa5fa7006c40563c989e7211aba95b793a/Keras-2.3.0-py2.py3-none-any.whl\n", + "Collecting tensorflow\n", + " Using cached https://files.pythonhosted.org/packages/7c/fb/7b2c5b3e85ad335b53ca67deb2ef4af574dc0a8759f43b7f45e15005e449/tensorflow-1.14.0-cp35-cp35m-manylinux1_x86_64.whl\n", + "Collecting pyyaml (from keras)\n", + "Collecting h5py (from keras)\n", + " Using cached https://files.pythonhosted.org/packages/10/56/d5c53cd170529bb40cd7dd43e2b68944cb65a45f65ab4c78a68f4ac9e51e/h5py-2.10.0-cp35-cp35m-manylinux1_x86_64.whl\n", + "Collecting six>=1.9.0 (from keras)\n", + " Using cached https://files.pythonhosted.org/packages/73/fb/00a976f728d0d1fecfe898238ce23f502a721c0ac0ecfedb80e0d88c64e9/six-1.12.0-py2.py3-none-any.whl\n", + "Collecting keras-preprocessing>=1.0.5 (from keras)\n", + " Using cached https://files.pythonhosted.org/packages/28/6a/8c1f62c37212d9fc441a7e26736df51ce6f0e38455816445471f10da4f0a/Keras_Preprocessing-1.1.0-py2.py3-none-any.whl\n", + "Collecting scipy>=0.14 (from keras)\n", + " Using cached https://files.pythonhosted.org/packages/7a/0e/3781e028d62a8422244582abd8f084e6314297026760587c85607f687bf3/scipy-1.3.1-cp35-cp35m-manylinux1_x86_64.whl\n", + "Collecting keras-applications>=1.0.6 (from keras)\n", + " Using cached https://files.pythonhosted.org/packages/71/e3/19762fdfc62877ae9102edf6342d71b28fbfd9dea3d2f96a882ce099b03f/Keras_Applications-1.0.8-py3-none-any.whl\n", + "Collecting numpy>=1.9.1 (from keras)\n", + " Using cached https://files.pythonhosted.org/packages/9b/21/2b18339d24a2f73dcefb2f10f48aff6182e16da83e3a612684443c6cfb29/numpy-1.17.2-cp35-cp35m-manylinux1_x86_64.whl\n", + "Collecting protobuf>=3.6.1 (from tensorflow)\n", + " Using cached https://files.pythonhosted.org/packages/9c/3e/05df91cc2d08eec88b1869962beb6b144755e7d4a7a6668e1b9f0f450037/protobuf-3.9.2-cp35-cp35m-manylinux1_x86_64.whl\n", + "Collecting astor>=0.6.0 (from tensorflow)\n", + " Using cached https://files.pythonhosted.org/packages/d1/4f/950dfae467b384fc96bc6469de25d832534f6b4441033c39f914efd13418/astor-0.8.0-py2.py3-none-any.whl\n", + "Collecting wrapt>=1.11.1 (from tensorflow)\n", + "Collecting wheel>=0.26 (from tensorflow)\n", + " Using cached https://files.pythonhosted.org/packages/00/83/b4a77d044e78ad1a45610eb88f745be2fd2c6d658f9798a15e384b7d57c9/wheel-0.33.6-py2.py3-none-any.whl\n", + "Collecting termcolor>=1.1.0 (from tensorflow)\n", + "Collecting gast>=0.2.0 (from tensorflow)\n", + "Collecting grpcio>=1.8.6 (from tensorflow)\n", + " Using cached https://files.pythonhosted.org/packages/42/69/4acc9bdf349db7258867b8af96112661fbce65034de1326d65ad14c96e50/grpcio-1.24.0-cp35-cp35m-manylinux1_x86_64.whl\n", + "Collecting absl-py>=0.7.0 (from tensorflow)\n", + "Collecting tensorflow-estimator<1.15.0rc0,>=1.14.0rc0 (from tensorflow)\n", + " Using cached https://files.pythonhosted.org/packages/3c/d5/21860a5b11caf0678fbc8319341b0ae21a07156911132e0e71bffed0510d/tensorflow_estimator-1.14.0-py2.py3-none-any.whl\n", + "Collecting google-pasta>=0.1.6 (from tensorflow)\n", + " Using cached https://files.pythonhosted.org/packages/d0/33/376510eb8d6246f3c30545f416b2263eee461e40940c2a4413c711bdf62d/google_pasta-0.1.7-py3-none-any.whl\n", + "Collecting tensorboard<1.15.0,>=1.14.0 (from tensorflow)\n", + " Using cached https://files.pythonhosted.org/packages/91/2d/2ed263449a078cd9c8a9ba50ebd50123adf1f8cfbea1492f9084169b89d9/tensorboard-1.14.0-py3-none-any.whl\n", + "Collecting setuptools (from protobuf>=3.6.1->tensorflow)\n", + " Using cached https://files.pythonhosted.org/packages/b2/86/095d2f7829badc207c893dd4ac767e871f6cd547145df797ea26baea4e2e/setuptools-41.2.0-py2.py3-none-any.whl\n", + "Collecting werkzeug>=0.11.15 (from tensorboard<1.15.0,>=1.14.0->tensorflow)\n", + " Using cached https://files.pythonhosted.org/packages/ce/42/3aeda98f96e85fd26180534d36570e4d18108d62ae36f87694b476b83d6f/Werkzeug-0.16.0-py2.py3-none-any.whl\n", + "Collecting markdown>=2.6.8 (from tensorboard<1.15.0,>=1.14.0->tensorflow)\n", + " Using cached https://files.pythonhosted.org/packages/c0/4e/fd492e91abdc2d2fcb70ef453064d980688762079397f779758e055f6575/Markdown-3.1.1-py2.py3-none-any.whl\n", + "Installing collected packages: pyyaml, numpy, six, h5py, keras-preprocessing, scipy, keras-applications, keras, setuptools, protobuf, astor, wrapt, wheel, termcolor, gast, grpcio, absl-py, tensorflow-estimator, google-pasta, werkzeug, markdown, tensorboard, tensorflow\n", + "Successfully installed absl-py-0.8.0 astor-0.8.0 gast-0.3.2 google-pasta-0.1.7 grpcio-1.24.0 h5py-2.10.0 keras-2.3.0 keras-applications-1.0.8 keras-preprocessing-1.1.0 markdown-3.1.1 numpy-1.17.2 protobuf-3.9.2 pyyaml-5.1.2 scipy-1.3.1 setuptools-41.2.0 six-1.12.0 tensorboard-1.14.0 tensorflow-1.14.0 tensorflow-estimator-1.14.0 termcolor-1.1.0 werkzeug-0.16.0 wheel-0.33.6 wrapt-1.11.2\n", + "\u001b[33mYou are using pip version 8.1.1, however version 19.2.3 is available.\n", + "You should consider upgrading via the 'pip install --upgrade pip' command.\u001b[0m\n" ] } ], @@ -60,33 +114,6 @@ "! pip3 install keras tensorflow" ] }, - { - "cell_type": "code", - "execution_count": 2, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "#!/usr/bin/python\r\n", - "# GENERATED BY DEBIAN\r\n", - "\r\n", - "import sys\r\n", - "\r\n", - "# Run the main entry point, similarly to how setuptools does it, but because\r\n", - "# we didn't install the actual entry point from setup.py, don't use the\r\n", - "# pkg_resources API.\r\n", - "from pip import main\r\n", - "if __name__ == '__main__':\r\n", - " sys.exit(main())\r\n" - ] - } - ], - "source": [ - "!cat /usr/bin/pip" - ] - }, { "cell_type": "markdown", "metadata": {}, @@ -98,7 +125,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 2, "metadata": { "scrolled": true }, @@ -107,26 +134,53 @@ "name": "stdout", "output_type": "stream", "text": [ - "/home/u26212/.local/lib/python3.5/site-packages/tensorflow/python/framework/dtypes.py:523: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.\n", + "Using TensorFlow backend.\n", + "/home/u26212/.local/lib/python3.5/site-packages/tensorflow/python/framework/dtypes.py:516: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.\n", " _np_qint8 = np.dtype([(\"qint8\", np.int8, 1)])\n", - "/home/u26212/.local/lib/python3.5/site-packages/tensorflow/python/framework/dtypes.py:524: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.\n", + "/home/u26212/.local/lib/python3.5/site-packages/tensorflow/python/framework/dtypes.py:517: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.\n", " _np_quint8 = np.dtype([(\"quint8\", np.uint8, 1)])\n", + "/home/u26212/.local/lib/python3.5/site-packages/tensorflow/python/framework/dtypes.py:518: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.\n", + " _np_qint16 = np.dtype([(\"qint16\", np.int16, 1)])\n", + "/home/u26212/.local/lib/python3.5/site-packages/tensorflow/python/framework/dtypes.py:519: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.\n", + " _np_quint16 = np.dtype([(\"quint16\", np.uint16, 1)])\n", + "/home/u26212/.local/lib/python3.5/site-packages/tensorflow/python/framework/dtypes.py:520: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.\n", + " _np_qint32 = np.dtype([(\"qint32\", np.int32, 1)])\n", "/home/u26212/.local/lib/python3.5/site-packages/tensorflow/python/framework/dtypes.py:525: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.\n", + " np_resource = np.dtype([(\"resource\", np.ubyte, 1)])\n", + "/home/u26212/.local/lib/python3.5/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:541: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.\n", + " _np_qint8 = np.dtype([(\"qint8\", np.int8, 1)])\n", + "/home/u26212/.local/lib/python3.5/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:542: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.\n", + " _np_quint8 = np.dtype([(\"quint8\", np.uint8, 1)])\n", + "/home/u26212/.local/lib/python3.5/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:543: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.\n", " _np_qint16 = np.dtype([(\"qint16\", np.int16, 1)])\n", - "/home/u26212/.local/lib/python3.5/site-packages/tensorflow/python/framework/dtypes.py:526: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.\n", + "/home/u26212/.local/lib/python3.5/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:544: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.\n", " _np_quint16 = np.dtype([(\"quint16\", np.uint16, 1)])\n", - "/home/u26212/.local/lib/python3.5/site-packages/tensorflow/python/framework/dtypes.py:527: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.\n", + "/home/u26212/.local/lib/python3.5/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:545: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.\n", " _np_qint32 = np.dtype([(\"qint32\", np.int32, 1)])\n", - "/home/u26212/.local/lib/python3.5/site-packages/tensorflow/python/framework/dtypes.py:532: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.\n", + "/home/u26212/.local/lib/python3.5/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:550: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.\n", " np_resource = np.dtype([(\"resource\", np.ubyte, 1)])\n", - "Traceback (most recent call last):\n", - " File \"Deep_Learning_Tutorial.py\", line 28, in \n", - " from keras.models import Sequential\n", - " File \"/home/u26212/30/iot-devcloud/smart_video_workshop/dl-model-training/Python/keras/__init__.py\", line 20, in \n", - " from . import layers\n", - " File \"/home/u26212/30/iot-devcloud/smart_video_workshop/dl-model-training/Python/keras/layers/__init__.py\", line 8, in \n", - " from tensorflow.python.estimator.keras import Layer\n", - "ImportError: cannot import name 'Layer'\n" + "WARNING:tensorflow:From /home/u26212/.local/lib/python3.5/site-packages/keras/backend/tensorflow_backend.py:4070: The name tf.nn.max_pool is deprecated. Please use tf.nn.max_pool2d instead.\n", + "\n", + "2019-09-30 00:07:34.824930: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 AVX512F FMA\n", + "2019-09-30 00:07:34.852350: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 2000000000 Hz\n", + "2019-09-30 00:07:34.852686: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x5a39550 executing computations on platform Host. Devices:\n", + "2019-09-30 00:07:34.852724: I tensorflow/compiler/xla/service/service.cc:175] StreamExecutor device (0): , \n", + "2019-09-30 00:07:34.899578: W tensorflow/compiler/jit/mark_for_compilation_pass.cc:1412] (One-time warning): Not using XLA:CPU for cluster because envvar TF_XLA_FLAGS=--tf_xla_cpu_global_jit was not set. If you want XLA:CPU, either set that envvar, or use experimental_jit_scope to enable XLA:CPU. To confirm that XLA is active, pass --vmodule=xla_compilation_cache=1 (as a proper command-line flag, not via TF_XLA_FLAGS) or set the envvar XLA_FLAGS=--xla_hlo_profile.\n", + "WARNING:tensorflow:From /home/u26212/.local/lib/python3.5/site-packages/keras/backend/tensorflow_backend.py:422: The name tf.global_variables is deprecated. Please use tf.compat.v1.global_variables instead.\n", + "\n", + "Train on 60000 samples, validate on 10000 samples\n", + "Epoch 1/5\n", + "60000/60000 [==============================] - 18s 296us/step - loss: 0.2280 - accuracy: 0.9347 - val_loss: 0.0849 - val_accuracy: 0.9730\n", + "Epoch 2/5\n", + "60000/60000 [==============================] - 23s 378us/step - loss: 0.0692 - accuracy: 0.9803 - val_loss: 0.0561 - val_accuracy: 0.9816\n", + "Epoch 3/5\n", + "60000/60000 [==============================] - 19s 325us/step - loss: 0.0463 - accuracy: 0.9862 - val_loss: 0.0490 - val_accuracy: 0.9831\n", + "Epoch 4/5\n", + "60000/60000 [==============================] - 26s 426us/step - loss: 0.0339 - accuracy: 0.9897 - val_loss: 0.0443 - val_accuracy: 0.9841\n", + "Epoch 5/5\n", + "60000/60000 [==============================] - 18s 304us/step - loss: 0.0256 - accuracy: 0.9921 - val_loss: 0.0412 - val_accuracy: 0.9862\n", + "10000/10000 [==============================] - 2s 187us/step\n", + "Accuracy = 98.61999750137329%\n" ] } ], @@ -153,41 +207,9 @@ "cell_type": "code", "execution_count": 4, "metadata": {}, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "/home/u28225/.local/lib/python3.5/site-packages/tensorflow/python/framework/dtypes.py:523: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.\n", - " _np_qint8 = np.dtype([(\"qint8\", np.int8, 1)])\n", - "/home/u28225/.local/lib/python3.5/site-packages/tensorflow/python/framework/dtypes.py:524: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.\n", - " _np_quint8 = np.dtype([(\"quint8\", np.uint8, 1)])\n", - "/home/u28225/.local/lib/python3.5/site-packages/tensorflow/python/framework/dtypes.py:525: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.\n", - " _np_qint16 = np.dtype([(\"qint16\", np.int16, 1)])\n", - "/home/u28225/.local/lib/python3.5/site-packages/tensorflow/python/framework/dtypes.py:526: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.\n", - " _np_quint16 = np.dtype([(\"quint16\", np.uint16, 1)])\n", - "/home/u28225/.local/lib/python3.5/site-packages/tensorflow/python/framework/dtypes.py:527: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.\n", - " _np_qint32 = np.dtype([(\"qint32\", np.int32, 1)])\n", - "/home/u28225/.local/lib/python3.5/site-packages/tensorflow/python/framework/dtypes.py:532: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.\n", - " np_resource = np.dtype([(\"resource\", np.ubyte, 1)])\n" - ] - }, - { - "ename": "ImportError", - "evalue": "cannot import name 'Layer'", - "output_type": "error", - "traceback": [ - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[0;31mImportError\u001b[0m Traceback (most recent call last)", - "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0;32mfrom\u001b[0m \u001b[0mkeras\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mmodels\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mSequential\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", - "\u001b[0;32m~/Reference-samples/smart-video-workshop/dl-model-training/Python/keras/__init__.py\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[1;32m 18\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0;34m.\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mestimator\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 19\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0;34m.\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0minitializers\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 20\u001b[0;31m \u001b[0;32mfrom\u001b[0m \u001b[0;34m.\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mlayers\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 21\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0;34m.\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mlosses\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 22\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0;34m.\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mmetrics\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;32m~/Reference-samples/smart-video-workshop/dl-model-training/Python/keras/layers/__init__.py\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[1;32m 6\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0m__future__\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mprint_function\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 7\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 8\u001b[0;31m \u001b[0;32mfrom\u001b[0m \u001b[0mtensorflow\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpython\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mestimator\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mkeras\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mLayer\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 9\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0mtensorflow\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpython\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mkeras\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mInput\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 10\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0mtensorflow\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpython\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mkeras\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mapplications\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdensenet\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mActivation\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;31mImportError\u001b[0m: cannot import name 'Layer'" - ] - } - ], + "outputs": [], "source": [ - "from keras.models import Sequential" + "from tensorflow.keras.models import Sequential" ] }, { @@ -205,25 +227,11 @@ }, { "cell_type": "code", - "execution_count": 16, + "execution_count": 5, "metadata": {}, - "outputs": [ - { - "ename": "ImportError", - "evalue": "cannot import name 'Layer'", - "output_type": "error", - "traceback": [ - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[0;31mImportError\u001b[0m Traceback (most recent call last)", - "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0;32mfrom\u001b[0m \u001b[0mkeras\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mlayers\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mDense\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mFlatten\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", - "\u001b[0;32m~/Reference-samples/smart-video-workshop/dl-model-training/Python/keras/__init__.py\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[1;32m 18\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0;34m.\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mestimator\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 19\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0;34m.\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0minitializers\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 20\u001b[0;31m \u001b[0;32mfrom\u001b[0m \u001b[0;34m.\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mlayers\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 21\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0;34m.\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mlosses\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 22\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0;34m.\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mmetrics\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;32m~/Reference-samples/smart-video-workshop/dl-model-training/Python/keras/layers/__init__.py\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[1;32m 6\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0m__future__\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mprint_function\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 7\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 8\u001b[0;31m \u001b[0;32mfrom\u001b[0m \u001b[0mtensorflow\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpython\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mestimator\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mkeras\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mLayer\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 9\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0mtensorflow\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpython\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mkeras\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mInput\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 10\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0mtensorflow\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpython\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mkeras\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mapplications\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdensenet\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mActivation\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;31mImportError\u001b[0m: cannot import name 'Layer'" - ] - } - ], + "outputs": [], "source": [ - "from keras.layers import Dense, Flatten" + "from tensorflow.keras.layers import Dense, Flatten" ] }, { @@ -240,25 +248,11 @@ }, { "cell_type": "code", - "execution_count": 17, + "execution_count": 6, "metadata": {}, - "outputs": [ - { - "ename": "ImportError", - "evalue": "cannot import name 'Layer'", - "output_type": "error", - "traceback": [ - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[0;31mImportError\u001b[0m Traceback (most recent call last)", - "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0;32mfrom\u001b[0m \u001b[0mkeras\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mlayers\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mConv2D\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", - "\u001b[0;32m~/Reference-samples/smart-video-workshop/dl-model-training/Python/keras/__init__.py\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[1;32m 18\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0;34m.\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mestimator\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 19\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0;34m.\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0minitializers\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 20\u001b[0;31m \u001b[0;32mfrom\u001b[0m \u001b[0;34m.\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mlayers\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 21\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0;34m.\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mlosses\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 22\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0;34m.\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mmetrics\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;32m~/Reference-samples/smart-video-workshop/dl-model-training/Python/keras/layers/__init__.py\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[1;32m 6\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0m__future__\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mprint_function\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 7\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 8\u001b[0;31m \u001b[0;32mfrom\u001b[0m \u001b[0mtensorflow\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpython\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mestimator\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mkeras\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mLayer\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 9\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0mtensorflow\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpython\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mkeras\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mInput\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 10\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0mtensorflow\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpython\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mkeras\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mapplications\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdensenet\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mActivation\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;31mImportError\u001b[0m: cannot import name 'Layer'" - ] - } - ], + "outputs": [], "source": [ - "from keras.layers import Conv2D" + "from tensorflow.keras.layers import Conv2D" ] }, { @@ -275,25 +269,11 @@ }, { "cell_type": "code", - "execution_count": 21, + "execution_count": 7, "metadata": {}, - "outputs": [ - { - "ename": "ImportError", - "evalue": "cannot import name 'Layer'", - "output_type": "error", - "traceback": [ - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[0;31mImportError\u001b[0m Traceback (most recent call last)", - "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0;32mfrom\u001b[0m \u001b[0mkeras\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mlayers\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mMaxPooling2D\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", - "\u001b[0;32m~/Reference-samples/smart-video-workshop/dl-model-training/Python/keras/__init__.py\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[1;32m 18\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0;34m.\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mestimator\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 19\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0;34m.\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0minitializers\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 20\u001b[0;31m \u001b[0;32mfrom\u001b[0m \u001b[0;34m.\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mlayers\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 21\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0;34m.\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mlosses\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 22\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0;34m.\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mmetrics\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;32m~/Reference-samples/smart-video-workshop/dl-model-training/Python/keras/layers/__init__.py\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[1;32m 6\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0m__future__\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mprint_function\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 7\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 8\u001b[0;31m \u001b[0;32mfrom\u001b[0m \u001b[0mtensorflow\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpython\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mestimator\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mkeras\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mLayer\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 9\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0mtensorflow\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpython\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mkeras\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mInput\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 10\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0mtensorflow\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpython\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mkeras\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mapplications\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdensenet\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mActivation\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;31mImportError\u001b[0m: cannot import name 'Layer'" - ] - } - ], + "outputs": [], "source": [ - "from keras.layers import MaxPooling2D" + "from tensorflow.keras.layers import MaxPooling2D" ] }, { @@ -307,25 +287,11 @@ }, { "cell_type": "code", - "execution_count": 24, + "execution_count": 8, "metadata": {}, - "outputs": [ - { - "ename": "ImportError", - "evalue": "cannot import name 'Layer'", - "output_type": "error", - "traceback": [ - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[0;31mImportError\u001b[0m Traceback (most recent call last)", - "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0;32mfrom\u001b[0m \u001b[0mkeras\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mutils\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mnp_utils\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", - "\u001b[0;32m~/Reference-samples/smart-video-workshop/dl-model-training/Python/keras/__init__.py\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[1;32m 18\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0;34m.\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mestimator\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 19\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0;34m.\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0minitializers\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 20\u001b[0;31m \u001b[0;32mfrom\u001b[0m \u001b[0;34m.\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mlayers\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 21\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0;34m.\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mlosses\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 22\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0;34m.\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mmetrics\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;32m~/Reference-samples/smart-video-workshop/dl-model-training/Python/keras/layers/__init__.py\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[1;32m 6\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0m__future__\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mprint_function\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 7\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 8\u001b[0;31m \u001b[0;32mfrom\u001b[0m \u001b[0mtensorflow\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpython\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mestimator\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mkeras\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mLayer\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 9\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0mtensorflow\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpython\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mkeras\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mInput\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 10\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0mtensorflow\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpython\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mkeras\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mapplications\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdensenet\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mActivation\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;31mImportError\u001b[0m: cannot import name 'Layer'" - ] - } - ], + "outputs": [], "source": [ - "from keras.utils import np_utils" + "from tensorflow.python.keras import utils" ] }, { @@ -343,11 +309,11 @@ }, { "cell_type": "code", - "execution_count": 25, + "execution_count": 9, "metadata": {}, "outputs": [], "source": [ - "from keras.datasets import mnist" + "from tensorflow.keras.datasets import mnist" ] }, { @@ -370,21 +336,9 @@ }, { "cell_type": "code", - "execution_count": 22, + "execution_count": 10, "metadata": {}, - "outputs": [ - { - "ename": "NameError", - "evalue": "name 'mnist' is not defined", - "output_type": "error", - "traceback": [ - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)", - "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0;34m(\u001b[0m\u001b[0mtrain_dataset\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mtrain_classes\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mtest_dataset\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mtest_classes\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mmnist\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mload_data\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", - "\u001b[0;31mNameError\u001b[0m: name 'mnist' is not defined" - ] - } - ], + "outputs": [], "source": [ "(train_dataset, train_classes),(test_dataset, test_classes) = mnist.load_data()" ] @@ -405,7 +359,7 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": 11, "metadata": {}, "outputs": [], "source": [ @@ -424,7 +378,7 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": 12, "metadata": {}, "outputs": [], "source": [ @@ -443,7 +397,7 @@ }, { "cell_type": "code", - "execution_count": 15, + "execution_count": 13, "metadata": {}, "outputs": [], "source": [ @@ -462,12 +416,12 @@ }, { "cell_type": "code", - "execution_count": 16, + "execution_count": 14, "metadata": {}, "outputs": [], "source": [ - "train_classes = np_utils.to_categorical(train_classes, 10)\n", - "test_classes = np_utils.to_categorical(test_classes, 10)" + "train_classes = utils.to_categorical(train_classes, 10)\n", + "test_classes = utils.to_categorical(test_classes, 10)" ] }, { @@ -489,7 +443,7 @@ }, { "cell_type": "code", - "execution_count": 17, + "execution_count": 15, "metadata": {}, "outputs": [], "source": [ @@ -506,9 +460,19 @@ }, { "cell_type": "code", - "execution_count": 18, + "execution_count": 16, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "WARNING:tensorflow:From /home/u26212/.local/lib/python3.5/site-packages/tensorflow/python/ops/init_ops.py:1251: calling VarianceScaling.__init__ (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.\n", + "Instructions for updating:\n", + "Call initializer instance with the dtype argument instead of passing it to the constructor\n" + ] + } + ], "source": [ "cnn.add(Conv2D(32, (3,3), input_shape = (28, 28, 1), activation = 'relu'))" ] @@ -527,7 +491,7 @@ }, { "cell_type": "code", - "execution_count": 19, + "execution_count": 17, "metadata": {}, "outputs": [], "source": [ @@ -550,7 +514,7 @@ }, { "cell_type": "code", - "execution_count": 20, + "execution_count": 18, "metadata": {}, "outputs": [], "source": [ @@ -573,7 +537,7 @@ }, { "cell_type": "code", - "execution_count": 21, + "execution_count": 19, "metadata": {}, "outputs": [], "source": [ @@ -591,7 +555,7 @@ }, { "cell_type": "code", - "execution_count": 22, + "execution_count": 20, "metadata": {}, "outputs": [], "source": [ @@ -612,7 +576,7 @@ }, { "cell_type": "code", - "execution_count": 23, + "execution_count": 21, "metadata": {}, "outputs": [], "source": [ @@ -643,7 +607,7 @@ }, { "cell_type": "code", - "execution_count": 24, + "execution_count": 22, "metadata": {}, "outputs": [ { @@ -652,24 +616,24 @@ "text": [ "Train on 60000 samples, validate on 10000 samples\n", "Epoch 1/5\n", - "60000/60000 [==============================] - 28s 466us/step - loss: 0.2331 - acc: 0.9345 - val_loss: 0.0786 - val_acc: 0.9763\n", + "60000/60000 [==============================] - 24s 397us/sample - loss: 0.2106 - acc: 0.9392 - val_loss: 0.0739 - val_acc: 0.9772\n", "Epoch 2/5\n", - "60000/60000 [==============================] - 28s 464us/step - loss: 0.0712 - acc: 0.9790 - val_loss: 0.0648 - val_acc: 0.9787\n", + "60000/60000 [==============================] - 29s 478us/sample - loss: 0.0653 - acc: 0.9804 - val_loss: 0.0562 - val_acc: 0.9822\n", "Epoch 3/5\n", - "60000/60000 [==============================] - 28s 460us/step - loss: 0.0493 - acc: 0.9853 - val_loss: 0.0471 - val_acc: 0.9835\n", + "60000/60000 [==============================] - 29s 480us/sample - loss: 0.0447 - acc: 0.9867 - val_loss: 0.0523 - val_acc: 0.9840\n", "Epoch 4/5\n", - "60000/60000 [==============================] - 28s 461us/step - loss: 0.0358 - acc: 0.9892 - val_loss: 0.0475 - val_acc: 0.9827\n", + "60000/60000 [==============================] - 29s 477us/sample - loss: 0.0342 - acc: 0.9895 - val_loss: 0.0443 - val_acc: 0.9843\n", "Epoch 5/5\n", - "60000/60000 [==============================] - 28s 462us/step - loss: 0.0279 - acc: 0.9918 - val_loss: 0.0427 - val_acc: 0.9858\n" + "60000/60000 [==============================] - 29s 477us/sample - loss: 0.0252 - acc: 0.9928 - val_loss: 0.0412 - val_acc: 0.9867\n" ] }, { "data": { "text/plain": [ - "" + "" ] }, - "execution_count": 24, + "execution_count": 22, "metadata": {}, "output_type": "execute_result" } @@ -698,15 +662,15 @@ }, { "cell_type": "code", - "execution_count": 25, + "execution_count": 23, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "10000/10000 [==============================] - 3s 274us/step\n", - "Accuracy = 98.58%\n" + "10000/10000 [==============================] - 2s 192us/sample - loss: 0.0412 - acc: 0.9867\n", + "Accuracy = 98.66999983787537%\n" ] } ], diff --git a/dl-model-training/devcloud/keras/__init__.py b/dl-model-training/devcloud/keras/__init__.py deleted file mode 100644 index 36b4b060..00000000 --- a/dl-model-training/devcloud/keras/__init__.py +++ /dev/null @@ -1,34 +0,0 @@ -# This file is MACHINE GENERATED! Do not edit. -# Generated by: tensorflow/tools/api/generator/create_python_api.py script. -"""Implementation of the Keras API meant to be a high-level API for TensorFlow. - -Detailed documentation and user guides are available at -[keras.io](https://keras.io). - -""" - -from __future__ import print_function - -from . import activations -from . import applications -from . import backend -from . import callbacks -from . import constraints -from . import datasets -from . import estimator -from . import initializers -from . import layers -from . import losses -from . import metrics -from . import models -from . import optimizers -from . import preprocessing -from . import regularizers -from . import utils -from . import wrappers -from tensorflow.python.keras import Input -from tensorflow.python.keras import Model -from tensorflow.python.keras import Sequential -from tensorflow.python.keras import __version__ - -del print_function diff --git a/dl-model-training/devcloud/keras/activations/__init__.py b/dl-model-training/devcloud/keras/activations/__init__.py deleted file mode 100644 index 4433c765..00000000 --- a/dl-model-training/devcloud/keras/activations/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# This file is MACHINE GENERATED! Do not edit. -# Generated by: tensorflow/tools/api/generator/create_python_api.py script. -"""Built-in activation functions. - -""" - -from __future__ import print_function - -from tensorflow.python.keras.activations import deserialize -from tensorflow.python.keras.activations import elu -from tensorflow.python.keras.activations import get -from tensorflow.python.keras.activations import hard_sigmoid -from tensorflow.python.keras.activations import linear -from tensorflow.python.keras.activations import relu -from tensorflow.python.keras.activations import selu -from tensorflow.python.keras.activations import serialize -from tensorflow.python.keras.activations import sigmoid -from tensorflow.python.keras.activations import softmax -from tensorflow.python.keras.activations import softplus -from tensorflow.python.keras.activations import softsign -from tensorflow.python.keras.activations import tanh - -del print_function diff --git a/dl-model-training/devcloud/keras/applications/__init__.py b/dl-model-training/devcloud/keras/applications/__init__.py deleted file mode 100644 index 326d1919..00000000 --- a/dl-model-training/devcloud/keras/applications/__init__.py +++ /dev/null @@ -1,30 +0,0 @@ -# This file is MACHINE GENERATED! Do not edit. -# Generated by: tensorflow/tools/api/generator/create_python_api.py script. -"""Keras Applications are canned architectures with pre-trained weights. -""" - -from __future__ import print_function - -from . import densenet -from . import inception_resnet_v2 -from . import inception_v3 -from . import mobilenet -from . import nasnet -from . import resnet50 -from . import vgg16 -from . import vgg19 -from . import xception -from tensorflow.python.keras.applications import DenseNet121 -from tensorflow.python.keras.applications import DenseNet169 -from tensorflow.python.keras.applications import DenseNet201 -from tensorflow.python.keras.applications import InceptionResNetV2 -from tensorflow.python.keras.applications import InceptionV3 -from tensorflow.python.keras.applications import MobileNet -from tensorflow.python.keras.applications import NASNetLarge -from tensorflow.python.keras.applications import NASNetMobile -from tensorflow.python.keras.applications import ResNet50 -from tensorflow.python.keras.applications import VGG16 -from tensorflow.python.keras.applications import VGG19 -from tensorflow.python.keras.applications import Xception - -del print_function diff --git a/dl-model-training/devcloud/keras/applications/densenet/__init__.py b/dl-model-training/devcloud/keras/applications/densenet/__init__.py deleted file mode 100644 index 7a0527dc..00000000 --- a/dl-model-training/devcloud/keras/applications/densenet/__init__.py +++ /dev/null @@ -1,20 +0,0 @@ -# This file is MACHINE GENERATED! Do not edit. -# Generated by: tensorflow/tools/api/generator/create_python_api.py script. -"""DenseNet models for Keras. - -# Reference paper - -- [Densely Connected Convolutional Networks] - (https://arxiv.org/abs/1608.06993) (CVPR 2017 Best Paper Award) - -""" - -from __future__ import print_function - -from tensorflow.python.keras.applications import DenseNet121 -from tensorflow.python.keras.applications import DenseNet169 -from tensorflow.python.keras.applications import DenseNet201 -from tensorflow.python.keras.applications.densenet import decode_predictions -from tensorflow.python.keras.applications.densenet import preprocess_input - -del print_function diff --git a/dl-model-training/devcloud/keras/applications/inception_resnet_v2/__init__.py b/dl-model-training/devcloud/keras/applications/inception_resnet_v2/__init__.py deleted file mode 100644 index 4d1fde45..00000000 --- a/dl-model-training/devcloud/keras/applications/inception_resnet_v2/__init__.py +++ /dev/null @@ -1,18 +0,0 @@ -# This file is MACHINE GENERATED! Do not edit. -# Generated by: tensorflow/tools/api/generator/create_python_api.py script. -"""Inception-ResNet V2 model for Keras. - -# Reference -- [Inception-v4, Inception-ResNet and the Impact of - Residual Connections on Learning](https://arxiv.org/abs/1602.07261) - - -""" - -from __future__ import print_function - -from tensorflow.python.keras.applications import InceptionResNetV2 -from tensorflow.python.keras.applications.densenet import decode_predictions -from tensorflow.python.keras.applications.inception_resnet_v2 import preprocess_input - -del print_function diff --git a/dl-model-training/devcloud/keras/applications/inception_v3/__init__.py b/dl-model-training/devcloud/keras/applications/inception_v3/__init__.py deleted file mode 100644 index 84badad3..00000000 --- a/dl-model-training/devcloud/keras/applications/inception_v3/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# This file is MACHINE GENERATED! Do not edit. -# Generated by: tensorflow/tools/api/generator/create_python_api.py script. -"""Inception V3 model for Keras. - -Note that the input image format for this model is different than for -the VGG16 and ResNet models (299x299 instead of 224x224), -and that the input preprocessing function is also different (same as Xception). - -# Reference - -- [Rethinking the Inception Architecture for Computer -Vision](http://arxiv.org/abs/1512.00567) - - -""" - -from __future__ import print_function - -from tensorflow.python.keras.applications import InceptionV3 -from tensorflow.python.keras.applications.densenet import decode_predictions -from tensorflow.python.keras.applications.inception_v3 import preprocess_input - -del print_function diff --git a/dl-model-training/devcloud/keras/applications/mobilenet/__init__.py b/dl-model-training/devcloud/keras/applications/mobilenet/__init__.py deleted file mode 100644 index 2acef171..00000000 --- a/dl-model-training/devcloud/keras/applications/mobilenet/__init__.py +++ /dev/null @@ -1,62 +0,0 @@ -# This file is MACHINE GENERATED! Do not edit. -# Generated by: tensorflow/tools/api/generator/create_python_api.py script. -"""MobileNet v1 models for Keras. - -MobileNet is a general architecture and can be used for multiple use cases. -Depending on the use case, it can use different input layer size and -different width factors. This allows different width models to reduce -the number of multiply-adds and thereby -reduce inference cost on mobile devices. - -MobileNets support any input size greater than 32 x 32, with larger image sizes -offering better performance. -The number of parameters and number of multiply-adds -can be modified by using the `alpha` parameter, -which increases/decreases the number of filters in each layer. -By altering the image size and `alpha` parameter, -all 16 models from the paper can be built, with ImageNet weights provided. - -The paper demonstrates the performance of MobileNets using `alpha` values of -1.0 (also called 100 % MobileNet), 0.75, 0.5 and 0.25. -For each of these `alpha` values, weights for 4 different input image sizes -are provided (224, 192, 160, 128). - -The following table describes the size and accuracy of the 100% MobileNet -on size 224 x 224: ----------------------------------------------------------------------------- -Width Multiplier (alpha) | ImageNet Acc | Multiply-Adds (M) | Params (M) ----------------------------------------------------------------------------- -| 1.0 MobileNet-224 | 70.6 % | 529 | 4.2 | -| 0.75 MobileNet-224 | 68.4 % | 325 | 2.6 | -| 0.50 MobileNet-224 | 63.7 % | 149 | 1.3 | -| 0.25 MobileNet-224 | 50.6 % | 41 | 0.5 | ----------------------------------------------------------------------------- - -The following table describes the performance of -the 100 % MobileNet on various input sizes: ------------------------------------------------------------------------- - Resolution | ImageNet Acc | Multiply-Adds (M) | Params (M) ------------------------------------------------------------------------- -| 1.0 MobileNet-224 | 70.6 % | 529 | 4.2 | -| 1.0 MobileNet-192 | 69.1 % | 529 | 4.2 | -| 1.0 MobileNet-160 | 67.2 % | 529 | 4.2 | -| 1.0 MobileNet-128 | 64.4 % | 529 | 4.2 | ------------------------------------------------------------------------- - -The weights for all 16 models are obtained and translated -from TensorFlow checkpoints found at -https://github.com/tensorflow/models/blob/master/research/slim/nets/mobilenet_v1.md - -# Reference -- [MobileNets: Efficient Convolutional Neural Networks for - Mobile Vision Applications](https://arxiv.org/pdf/1704.04861.pdf)) - -""" - -from __future__ import print_function - -from tensorflow.python.keras.applications import MobileNet -from tensorflow.python.keras.applications.densenet import decode_predictions -from tensorflow.python.keras.applications.mobilenet import preprocess_input - -del print_function diff --git a/dl-model-training/devcloud/keras/applications/nasnet/__init__.py b/dl-model-training/devcloud/keras/applications/nasnet/__init__.py deleted file mode 100644 index bc85ada3..00000000 --- a/dl-model-training/devcloud/keras/applications/nasnet/__init__.py +++ /dev/null @@ -1,36 +0,0 @@ -# This file is MACHINE GENERATED! Do not edit. -# Generated by: tensorflow/tools/api/generator/create_python_api.py script. -"""NASNet-A models for Keras. - -NASNet refers to Neural Architecture Search Network, a family of models -that were designed automatically by learning the model architectures -directly on the dataset of interest. - -Here we consider NASNet-A, the highest performance model that was found -for the CIFAR-10 dataset, and then extended to ImageNet 2012 dataset, -obtaining state of the art performance on CIFAR-10 and ImageNet 2012. -Only the NASNet-A models, and their respective weights, which are suited -for ImageNet 2012 are provided. - -The below table describes the performance on ImageNet 2012: --------------------------------------------------------------------------------- - Architecture | Top-1 Acc | Top-5 Acc | Multiply-Adds | Params (M) --------------------------------------------------------------------------------- -| NASNet-A (4 @ 1056) | 74.0 % | 91.6 % | 564 M | 5.3 | -| NASNet-A (6 @ 4032) | 82.7 % | 96.2 % | 23.8 B | 88.9 | --------------------------------------------------------------------------------- - -References: - - [Learning Transferable Architectures for Scalable Image Recognition] - (https://arxiv.org/abs/1707.07012) - -""" - -from __future__ import print_function - -from tensorflow.python.keras.applications import NASNetLarge -from tensorflow.python.keras.applications import NASNetMobile -from tensorflow.python.keras.applications.densenet import decode_predictions -from tensorflow.python.keras.applications.inception_v3 import preprocess_input - -del print_function diff --git a/dl-model-training/devcloud/keras/applications/resnet50/__init__.py b/dl-model-training/devcloud/keras/applications/resnet50/__init__.py deleted file mode 100644 index 6d5b56bb..00000000 --- a/dl-model-training/devcloud/keras/applications/resnet50/__init__.py +++ /dev/null @@ -1,20 +0,0 @@ -# This file is MACHINE GENERATED! Do not edit. -# Generated by: tensorflow/tools/api/generator/create_python_api.py script. -"""ResNet50 model for Keras. - -# Reference: - -- [Deep Residual Learning for Image -Recognition](https://arxiv.org/abs/1512.03385) - -Adapted from code contributed by BigMoyan. - -""" - -from __future__ import print_function - -from tensorflow.python.keras.applications import ResNet50 -from tensorflow.python.keras.applications.densenet import decode_predictions -from tensorflow.python.keras.applications.imagenet_utils import preprocess_input - -del print_function diff --git a/dl-model-training/devcloud/keras/applications/vgg16/__init__.py b/dl-model-training/devcloud/keras/applications/vgg16/__init__.py deleted file mode 100644 index 76663df6..00000000 --- a/dl-model-training/devcloud/keras/applications/vgg16/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# This file is MACHINE GENERATED! Do not edit. -# Generated by: tensorflow/tools/api/generator/create_python_api.py script. -"""VGG16 model for Keras. - -# Reference - -- [Very Deep Convolutional Networks for Large-Scale Image -Recognition](https://arxiv.org/abs/1409.1556) - - -""" - -from __future__ import print_function - -from tensorflow.python.keras.applications import VGG16 -from tensorflow.python.keras.applications.densenet import decode_predictions -from tensorflow.python.keras.applications.imagenet_utils import preprocess_input - -del print_function diff --git a/dl-model-training/devcloud/keras/applications/vgg19/__init__.py b/dl-model-training/devcloud/keras/applications/vgg19/__init__.py deleted file mode 100644 index c6368445..00000000 --- a/dl-model-training/devcloud/keras/applications/vgg19/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# This file is MACHINE GENERATED! Do not edit. -# Generated by: tensorflow/tools/api/generator/create_python_api.py script. -"""VGG19 model for Keras. - -# Reference - -- [Very Deep Convolutional Networks for Large-Scale Image -Recognition](https://arxiv.org/abs/1409.1556) - - -""" - -from __future__ import print_function - -from tensorflow.python.keras.applications import VGG19 -from tensorflow.python.keras.applications.densenet import decode_predictions -from tensorflow.python.keras.applications.imagenet_utils import preprocess_input - -del print_function diff --git a/dl-model-training/devcloud/keras/applications/xception/__init__.py b/dl-model-training/devcloud/keras/applications/xception/__init__.py deleted file mode 100644 index 9427a258..00000000 --- a/dl-model-training/devcloud/keras/applications/xception/__init__.py +++ /dev/null @@ -1,30 +0,0 @@ -# This file is MACHINE GENERATED! Do not edit. -# Generated by: tensorflow/tools/api/generator/create_python_api.py script. -"""Xception V1 model for Keras. - -On ImageNet, this model gets to a top-1 validation accuracy of 0.790 -and a top-5 validation accuracy of 0.945. - -Do note that the input image format for this model is different than for -the VGG16 and ResNet models (299x299 instead of 224x224), -and that the input preprocessing function -is also different (same as Inception V3). - -Also do note that this model is only available for the TensorFlow backend, -due to its reliance on `SeparableConvolution` layers. - -# Reference - -- [Xception: Deep Learning with Depthwise Separable -Convolutions](https://arxiv.org/abs/1610.02357) - - -""" - -from __future__ import print_function - -from tensorflow.python.keras.applications import Xception -from tensorflow.python.keras.applications.densenet import decode_predictions -from tensorflow.python.keras.applications.xception import preprocess_input - -del print_function diff --git a/dl-model-training/devcloud/keras/backend/__init__.py b/dl-model-training/devcloud/keras/backend/__init__.py deleted file mode 100644 index 083523e0..00000000 --- a/dl-model-training/devcloud/keras/backend/__init__.py +++ /dev/null @@ -1,148 +0,0 @@ -# This file is MACHINE GENERATED! Do not edit. -# Generated by: tensorflow/tools/api/generator/create_python_api.py script. -"""Keras backend API. - -""" - -from __future__ import print_function - -from tensorflow.python import name_scope -from tensorflow.python.keras.backend import abs -from tensorflow.python.keras.backend import all -from tensorflow.python.keras.backend import any -from tensorflow.python.keras.backend import arange -from tensorflow.python.keras.backend import argmax -from tensorflow.python.keras.backend import argmin -from tensorflow.python.keras.backend import backend -from tensorflow.python.keras.backend import batch_dot -from tensorflow.python.keras.backend import batch_flatten -from tensorflow.python.keras.backend import batch_get_value -from tensorflow.python.keras.backend import batch_normalization -from tensorflow.python.keras.backend import batch_set_value -from tensorflow.python.keras.backend import bias_add -from tensorflow.python.keras.backend import binary_crossentropy -from tensorflow.python.keras.backend import cast -from tensorflow.python.keras.backend import cast_to_floatx -from tensorflow.python.keras.backend import categorical_crossentropy -from tensorflow.python.keras.backend import clear_session -from tensorflow.python.keras.backend import clip -from tensorflow.python.keras.backend import concatenate -from tensorflow.python.keras.backend import constant -from tensorflow.python.keras.backend import conv1d -from tensorflow.python.keras.backend import conv2d -from tensorflow.python.keras.backend import conv2d_transpose -from tensorflow.python.keras.backend import conv3d -from tensorflow.python.keras.backend import cos -from tensorflow.python.keras.backend import count_params -from tensorflow.python.keras.backend import ctc_batch_cost -from tensorflow.python.keras.backend import ctc_decode -from tensorflow.python.keras.backend import ctc_label_dense_to_sparse -from tensorflow.python.keras.backend import dot -from tensorflow.python.keras.backend import dropout -from tensorflow.python.keras.backend import dtype -from tensorflow.python.keras.backend import elu -from tensorflow.python.keras.backend import epsilon -from tensorflow.python.keras.backend import equal -from tensorflow.python.keras.backend import eval -from tensorflow.python.keras.backend import exp -from tensorflow.python.keras.backend import expand_dims -from tensorflow.python.keras.backend import eye -from tensorflow.python.keras.backend import flatten -from tensorflow.python.keras.backend import floatx -from tensorflow.python.keras.backend import foldl -from tensorflow.python.keras.backend import foldr -from tensorflow.python.keras.backend import function -from tensorflow.python.keras.backend import gather -from tensorflow.python.keras.backend import get_session -from tensorflow.python.keras.backend import get_uid -from tensorflow.python.keras.backend import get_value -from tensorflow.python.keras.backend import gradients -from tensorflow.python.keras.backend import greater -from tensorflow.python.keras.backend import greater_equal -from tensorflow.python.keras.backend import hard_sigmoid -from tensorflow.python.keras.backend import image_data_format -from tensorflow.python.keras.backend import in_test_phase -from tensorflow.python.keras.backend import in_top_k -from tensorflow.python.keras.backend import in_train_phase -from tensorflow.python.keras.backend import int_shape -from tensorflow.python.keras.backend import is_sparse -from tensorflow.python.keras.backend import l2_normalize -from tensorflow.python.keras.backend import learning_phase -from tensorflow.python.keras.backend import less -from tensorflow.python.keras.backend import less_equal -from tensorflow.python.keras.backend import log -from tensorflow.python.keras.backend import manual_variable_initialization -from tensorflow.python.keras.backend import map_fn -from tensorflow.python.keras.backend import max -from tensorflow.python.keras.backend import maximum -from tensorflow.python.keras.backend import mean -from tensorflow.python.keras.backend import min -from tensorflow.python.keras.backend import minimum -from tensorflow.python.keras.backend import moving_average_update -from tensorflow.python.keras.backend import ndim -from tensorflow.python.keras.backend import normalize_batch_in_training -from tensorflow.python.keras.backend import not_equal -from tensorflow.python.keras.backend import one_hot -from tensorflow.python.keras.backend import ones -from tensorflow.python.keras.backend import ones_like -from tensorflow.python.keras.backend import permute_dimensions -from tensorflow.python.keras.backend import placeholder -from tensorflow.python.keras.backend import pool2d -from tensorflow.python.keras.backend import pool3d -from tensorflow.python.keras.backend import pow -from tensorflow.python.keras.backend import print_tensor -from tensorflow.python.keras.backend import prod -from tensorflow.python.keras.backend import random_binomial -from tensorflow.python.keras.backend import random_normal -from tensorflow.python.keras.backend import random_normal_variable -from tensorflow.python.keras.backend import random_uniform -from tensorflow.python.keras.backend import random_uniform_variable -from tensorflow.python.keras.backend import relu -from tensorflow.python.keras.backend import repeat -from tensorflow.python.keras.backend import repeat_elements -from tensorflow.python.keras.backend import reset_uids -from tensorflow.python.keras.backend import reshape -from tensorflow.python.keras.backend import resize_images -from tensorflow.python.keras.backend import resize_volumes -from tensorflow.python.keras.backend import reverse -from tensorflow.python.keras.backend import rnn -from tensorflow.python.keras.backend import round -from tensorflow.python.keras.backend import separable_conv2d -from tensorflow.python.keras.backend import set_epsilon -from tensorflow.python.keras.backend import set_floatx -from tensorflow.python.keras.backend import set_image_data_format -from tensorflow.python.keras.backend import set_learning_phase -from tensorflow.python.keras.backend import set_session -from tensorflow.python.keras.backend import set_value -from tensorflow.python.keras.backend import shape -from tensorflow.python.keras.backend import sigmoid -from tensorflow.python.keras.backend import sign -from tensorflow.python.keras.backend import sin -from tensorflow.python.keras.backend import softmax -from tensorflow.python.keras.backend import softplus -from tensorflow.python.keras.backend import softsign -from tensorflow.python.keras.backend import sparse_categorical_crossentropy -from tensorflow.python.keras.backend import spatial_2d_padding -from tensorflow.python.keras.backend import spatial_3d_padding -from tensorflow.python.keras.backend import sqrt -from tensorflow.python.keras.backend import square -from tensorflow.python.keras.backend import squeeze -from tensorflow.python.keras.backend import stack -from tensorflow.python.keras.backend import std -from tensorflow.python.keras.backend import stop_gradient -from tensorflow.python.keras.backend import sum -from tensorflow.python.keras.backend import switch -from tensorflow.python.keras.backend import tanh -from tensorflow.python.keras.backend import temporal_padding -from tensorflow.python.keras.backend import to_dense -from tensorflow.python.keras.backend import transpose -from tensorflow.python.keras.backend import truncated_normal -from tensorflow.python.keras.backend import update -from tensorflow.python.keras.backend import update_add -from tensorflow.python.keras.backend import update_sub -from tensorflow.python.keras.backend import var -from tensorflow.python.keras.backend import variable -from tensorflow.python.keras.backend import zeros -from tensorflow.python.keras.backend import zeros_like - -del print_function diff --git a/dl-model-training/devcloud/keras/callbacks/__init__.py b/dl-model-training/devcloud/keras/callbacks/__init__.py deleted file mode 100644 index 6c1b4381..00000000 --- a/dl-model-training/devcloud/keras/callbacks/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# This file is MACHINE GENERATED! Do not edit. -# Generated by: tensorflow/tools/api/generator/create_python_api.py script. -"""Callbacks: utilities called at certain points during model training. - -""" - -from __future__ import print_function - -from tensorflow.python.keras.callbacks import BaseLogger -from tensorflow.python.keras.callbacks import CSVLogger -from tensorflow.python.keras.callbacks import Callback -from tensorflow.python.keras.callbacks import EarlyStopping -from tensorflow.python.keras.callbacks import History -from tensorflow.python.keras.callbacks import LambdaCallback -from tensorflow.python.keras.callbacks import LearningRateScheduler -from tensorflow.python.keras.callbacks import ModelCheckpoint -from tensorflow.python.keras.callbacks import ProgbarLogger -from tensorflow.python.keras.callbacks import ReduceLROnPlateau -from tensorflow.python.keras.callbacks import RemoteMonitor -from tensorflow.python.keras.callbacks import TensorBoard -from tensorflow.python.keras.callbacks import TerminateOnNaN - -del print_function diff --git a/dl-model-training/devcloud/keras/constraints/__init__.py b/dl-model-training/devcloud/keras/constraints/__init__.py deleted file mode 100644 index 021c0289..00000000 --- a/dl-model-training/devcloud/keras/constraints/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# This file is MACHINE GENERATED! Do not edit. -# Generated by: tensorflow/tools/api/generator/create_python_api.py script. -"""Constraints: functions that impose constraints on weight values. - -""" - -from __future__ import print_function - -from tensorflow.python.keras.constraints import Constraint -from tensorflow.python.keras.constraints import MaxNorm -from tensorflow.python.keras.constraints import MaxNorm as max_norm -from tensorflow.python.keras.constraints import MinMaxNorm -from tensorflow.python.keras.constraints import MinMaxNorm as min_max_norm -from tensorflow.python.keras.constraints import NonNeg -from tensorflow.python.keras.constraints import NonNeg as non_neg -from tensorflow.python.keras.constraints import UnitNorm -from tensorflow.python.keras.constraints import UnitNorm as unit_norm -from tensorflow.python.keras.constraints import deserialize -from tensorflow.python.keras.constraints import get -from tensorflow.python.keras.constraints import serialize - -del print_function diff --git a/dl-model-training/devcloud/keras/datasets/__init__.py b/dl-model-training/devcloud/keras/datasets/__init__.py deleted file mode 100644 index 4e70365d..00000000 --- a/dl-model-training/devcloud/keras/datasets/__init__.py +++ /dev/null @@ -1,16 +0,0 @@ -# This file is MACHINE GENERATED! Do not edit. -# Generated by: tensorflow/tools/api/generator/create_python_api.py script. -"""Keras built-in datasets. -""" - -from __future__ import print_function - -from . import boston_housing -from . import cifar10 -from . import cifar100 -from . import fashion_mnist -from . import imdb -from . import mnist -from . import reuters - -del print_function diff --git a/dl-model-training/devcloud/keras/datasets/boston_housing/__init__.py b/dl-model-training/devcloud/keras/datasets/boston_housing/__init__.py deleted file mode 100644 index e3337e34..00000000 --- a/dl-model-training/devcloud/keras/datasets/boston_housing/__init__.py +++ /dev/null @@ -1,11 +0,0 @@ -# This file is MACHINE GENERATED! Do not edit. -# Generated by: tensorflow/tools/api/generator/create_python_api.py script. -"""Boston housing price regression dataset. - -""" - -from __future__ import print_function - -from tensorflow.python.keras.datasets.boston_housing import load_data - -del print_function diff --git a/dl-model-training/devcloud/keras/datasets/cifar10/__init__.py b/dl-model-training/devcloud/keras/datasets/cifar10/__init__.py deleted file mode 100644 index eb023bb5..00000000 --- a/dl-model-training/devcloud/keras/datasets/cifar10/__init__.py +++ /dev/null @@ -1,11 +0,0 @@ -# This file is MACHINE GENERATED! Do not edit. -# Generated by: tensorflow/tools/api/generator/create_python_api.py script. -"""CIFAR10 small images classification dataset. - -""" - -from __future__ import print_function - -from tensorflow.python.keras.datasets.cifar10 import load_data - -del print_function diff --git a/dl-model-training/devcloud/keras/datasets/cifar100/__init__.py b/dl-model-training/devcloud/keras/datasets/cifar100/__init__.py deleted file mode 100644 index 78d373dd..00000000 --- a/dl-model-training/devcloud/keras/datasets/cifar100/__init__.py +++ /dev/null @@ -1,11 +0,0 @@ -# This file is MACHINE GENERATED! Do not edit. -# Generated by: tensorflow/tools/api/generator/create_python_api.py script. -"""CIFAR100 small images classification dataset. - -""" - -from __future__ import print_function - -from tensorflow.python.keras.datasets.cifar100 import load_data - -del print_function diff --git a/dl-model-training/devcloud/keras/datasets/fashion_mnist/__init__.py b/dl-model-training/devcloud/keras/datasets/fashion_mnist/__init__.py deleted file mode 100644 index e90f6b67..00000000 --- a/dl-model-training/devcloud/keras/datasets/fashion_mnist/__init__.py +++ /dev/null @@ -1,11 +0,0 @@ -# This file is MACHINE GENERATED! Do not edit. -# Generated by: tensorflow/tools/api/generator/create_python_api.py script. -"""Fashion-MNIST dataset. - -""" - -from __future__ import print_function - -from tensorflow.python.keras.datasets.fashion_mnist import load_data - -del print_function diff --git a/dl-model-training/devcloud/keras/datasets/imdb/__init__.py b/dl-model-training/devcloud/keras/datasets/imdb/__init__.py deleted file mode 100644 index ef07f97b..00000000 --- a/dl-model-training/devcloud/keras/datasets/imdb/__init__.py +++ /dev/null @@ -1,12 +0,0 @@ -# This file is MACHINE GENERATED! Do not edit. -# Generated by: tensorflow/tools/api/generator/create_python_api.py script. -"""IMDB sentiment classification dataset. - -""" - -from __future__ import print_function - -from tensorflow.python.keras.datasets.imdb import get_word_index -from tensorflow.python.keras.datasets.imdb import load_data - -del print_function diff --git a/dl-model-training/devcloud/keras/datasets/mnist/__init__.py b/dl-model-training/devcloud/keras/datasets/mnist/__init__.py deleted file mode 100644 index 2e1e4543..00000000 --- a/dl-model-training/devcloud/keras/datasets/mnist/__init__.py +++ /dev/null @@ -1,11 +0,0 @@ -# This file is MACHINE GENERATED! Do not edit. -# Generated by: tensorflow/tools/api/generator/create_python_api.py script. -"""MNIST handwritten digits dataset. - -""" - -from __future__ import print_function - -from tensorflow.python.keras.datasets.mnist import load_data - -del print_function diff --git a/dl-model-training/devcloud/keras/datasets/reuters/__init__.py b/dl-model-training/devcloud/keras/datasets/reuters/__init__.py deleted file mode 100644 index dea36ccf..00000000 --- a/dl-model-training/devcloud/keras/datasets/reuters/__init__.py +++ /dev/null @@ -1,12 +0,0 @@ -# This file is MACHINE GENERATED! Do not edit. -# Generated by: tensorflow/tools/api/generator/create_python_api.py script. -"""Reuters topic classification dataset. - -""" - -from __future__ import print_function - -from tensorflow.python.keras.datasets.reuters import get_word_index -from tensorflow.python.keras.datasets.reuters import load_data - -del print_function diff --git a/dl-model-training/devcloud/keras/estimator/__init__.py b/dl-model-training/devcloud/keras/estimator/__init__.py deleted file mode 100644 index 90692882..00000000 --- a/dl-model-training/devcloud/keras/estimator/__init__.py +++ /dev/null @@ -1,11 +0,0 @@ -# This file is MACHINE GENERATED! Do not edit. -# Generated by: tensorflow/tools/api/generator/create_python_api.py script. -"""Home of estimator related functions. - -""" - -from __future__ import print_function - -from tensorflow.python.estimator.estimator_lib import model_to_estimator - -del print_function diff --git a/dl-model-training/devcloud/keras/initializers/__init__.py b/dl-model-training/devcloud/keras/initializers/__init__.py deleted file mode 100644 index d4cd0089..00000000 --- a/dl-model-training/devcloud/keras/initializers/__init__.py +++ /dev/null @@ -1,39 +0,0 @@ -# This file is MACHINE GENERATED! Do not edit. -# Generated by: tensorflow/tools/api/generator/create_python_api.py script. -"""Keras initializer classes (soon to be replaced with core TF initializers). - -""" - -from __future__ import print_function - -from tensorflow.python import Constant -from tensorflow.python import Constant as constant -from tensorflow.python import Identity -from tensorflow.python import Identity as identity -from tensorflow.python import Initializer -from tensorflow.python import Ones -from tensorflow.python import Ones as ones -from tensorflow.python import Orthogonal -from tensorflow.python import Orthogonal as orthogonal -from tensorflow.python import RandomNormal -from tensorflow.python import RandomNormal as normal -from tensorflow.python import RandomNormal as random_normal -from tensorflow.python import RandomUniform -from tensorflow.python import RandomUniform as random_uniform -from tensorflow.python import RandomUniform as uniform -from tensorflow.python import TruncatedNormal -from tensorflow.python import TruncatedNormal as truncated_normal -from tensorflow.python import VarianceScaling -from tensorflow.python import Zeros -from tensorflow.python import Zeros as zeros -from tensorflow.python.keras.initializers import deserialize -from tensorflow.python.keras.initializers import get -from tensorflow.python.keras.initializers import glorot_normal -from tensorflow.python.keras.initializers import glorot_uniform -from tensorflow.python.keras.initializers import he_normal -from tensorflow.python.keras.initializers import he_uniform -from tensorflow.python.keras.initializers import lecun_normal -from tensorflow.python.keras.initializers import lecun_uniform -from tensorflow.python.keras.initializers import serialize - -del print_function diff --git a/dl-model-training/devcloud/keras/layers/__init__.py b/dl-model-training/devcloud/keras/layers/__init__.py deleted file mode 100644 index ecd21ee0..00000000 --- a/dl-model-training/devcloud/keras/layers/__init__.py +++ /dev/null @@ -1,112 +0,0 @@ -# This file is MACHINE GENERATED! Do not edit. -# Generated by: tensorflow/tools/api/generator/create_python_api.py script. -"""Keras layers API. -""" - -from __future__ import print_function - -from tensorflow.python.estimator.keras import Layer -from tensorflow.python.keras import Input -from tensorflow.python.keras.applications.densenet import Activation -from tensorflow.python.keras.applications.densenet import AveragePooling2D -from tensorflow.python.keras.applications.densenet import AveragePooling2D as AvgPool2D -from tensorflow.python.keras.applications.densenet import BatchNormalization -from tensorflow.python.keras.applications.densenet import Concatenate -from tensorflow.python.keras.applications.densenet import Conv2D -from tensorflow.python.keras.applications.densenet import Conv2D as Convolution2D -from tensorflow.python.keras.applications.densenet import Dense -from tensorflow.python.keras.applications.densenet import GlobalAveragePooling2D -from tensorflow.python.keras.applications.densenet import GlobalAveragePooling2D as GlobalAvgPool2D -from tensorflow.python.keras.applications.densenet import GlobalMaxPooling2D -from tensorflow.python.keras.applications.densenet import GlobalMaxPooling2D as GlobalMaxPool2D -from tensorflow.python.keras.applications.densenet import MaxPooling2D -from tensorflow.python.keras.applications.densenet import MaxPooling2D as MaxPool2D -from tensorflow.python.keras.applications.densenet import ZeroPadding2D -from tensorflow.python.keras.applications.inception_resnet_v2 import Lambda -from tensorflow.python.keras.applications.mobilenet import DepthwiseConv2D -from tensorflow.python.keras.applications.mobilenet import Dropout -from tensorflow.python.keras.applications.mobilenet import InputSpec -from tensorflow.python.keras.applications.mobilenet import Reshape -from tensorflow.python.keras.applications.nasnet import Cropping2D -from tensorflow.python.keras.applications.nasnet import SeparableConv2D -from tensorflow.python.keras.applications.nasnet import SeparableConv2D as SeparableConvolution2D -from tensorflow.python.keras.applications.nasnet import add -from tensorflow.python.keras.applications.nasnet import concatenate -from tensorflow.python.keras.applications.resnet50 import Flatten -from tensorflow.python.keras.engine import InputLayer -from tensorflow.python.keras.layers import ActivityRegularization -from tensorflow.python.keras.layers import Add -from tensorflow.python.keras.layers import AlphaDropout -from tensorflow.python.keras.layers import Average -from tensorflow.python.keras.layers import AveragePooling1D -from tensorflow.python.keras.layers import AveragePooling1D as AvgPool1D -from tensorflow.python.keras.layers import AveragePooling3D -from tensorflow.python.keras.layers import AveragePooling3D as AvgPool3D -from tensorflow.python.keras.layers import Bidirectional -from tensorflow.python.keras.layers import Conv1D -from tensorflow.python.keras.layers import Conv1D as Convolution1D -from tensorflow.python.keras.layers import Conv2DTranspose -from tensorflow.python.keras.layers import Conv2DTranspose as Convolution2DTranspose -from tensorflow.python.keras.layers import Conv3D -from tensorflow.python.keras.layers import Conv3D as Convolution3D -from tensorflow.python.keras.layers import Conv3DTranspose -from tensorflow.python.keras.layers import Conv3DTranspose as Convolution3DTranspose -from tensorflow.python.keras.layers import ConvLSTM2D -from tensorflow.python.keras.layers import Cropping1D -from tensorflow.python.keras.layers import Cropping3D -from tensorflow.python.keras.layers import CuDNNGRU -from tensorflow.python.keras.layers import CuDNNLSTM -from tensorflow.python.keras.layers import Dot -from tensorflow.python.keras.layers import ELU -from tensorflow.python.keras.layers import Embedding -from tensorflow.python.keras.layers import GRU -from tensorflow.python.keras.layers import GRUCell -from tensorflow.python.keras.layers import GaussianDropout -from tensorflow.python.keras.layers import GaussianNoise -from tensorflow.python.keras.layers import GlobalAveragePooling1D -from tensorflow.python.keras.layers import GlobalAveragePooling1D as GlobalAvgPool1D -from tensorflow.python.keras.layers import GlobalAveragePooling3D -from tensorflow.python.keras.layers import GlobalAveragePooling3D as GlobalAvgPool3D -from tensorflow.python.keras.layers import GlobalMaxPool1D -from tensorflow.python.keras.layers import GlobalMaxPool1D as GlobalMaxPooling1D -from tensorflow.python.keras.layers import GlobalMaxPool3D -from tensorflow.python.keras.layers import GlobalMaxPool3D as GlobalMaxPooling3D -from tensorflow.python.keras.layers import LSTM -from tensorflow.python.keras.layers import LSTMCell -from tensorflow.python.keras.layers import LeakyReLU -from tensorflow.python.keras.layers import LocallyConnected1D -from tensorflow.python.keras.layers import LocallyConnected2D -from tensorflow.python.keras.layers import Masking -from tensorflow.python.keras.layers import MaxPool1D -from tensorflow.python.keras.layers import MaxPool1D as MaxPooling1D -from tensorflow.python.keras.layers import MaxPool3D -from tensorflow.python.keras.layers import MaxPool3D as MaxPooling3D -from tensorflow.python.keras.layers import Maximum -from tensorflow.python.keras.layers import Multiply -from tensorflow.python.keras.layers import PReLU -from tensorflow.python.keras.layers import Permute -from tensorflow.python.keras.layers import RNN -from tensorflow.python.keras.layers import RepeatVector -from tensorflow.python.keras.layers import SeparableConv1D -from tensorflow.python.keras.layers import SeparableConv1D as SeparableConvolution1D -from tensorflow.python.keras.layers import SimpleRNN -from tensorflow.python.keras.layers import SimpleRNNCell -from tensorflow.python.keras.layers import Softmax -from tensorflow.python.keras.layers import SpatialDropout1D -from tensorflow.python.keras.layers import SpatialDropout2D -from tensorflow.python.keras.layers import SpatialDropout3D -from tensorflow.python.keras.layers import StackedRNNCells -from tensorflow.python.keras.layers import ThresholdedReLU -from tensorflow.python.keras.layers import TimeDistributed -from tensorflow.python.keras.layers import UpSampling1D -from tensorflow.python.keras.layers import UpSampling2D -from tensorflow.python.keras.layers import UpSampling3D -from tensorflow.python.keras.layers import Wrapper -from tensorflow.python.keras.layers import ZeroPadding1D -from tensorflow.python.keras.layers import ZeroPadding3D -from tensorflow.python.keras.layers import average -from tensorflow.python.keras.layers import dot -from tensorflow.python.keras.layers import maximum -from tensorflow.python.keras.layers import multiply - -del print_function diff --git a/dl-model-training/devcloud/keras/losses/__init__.py b/dl-model-training/devcloud/keras/losses/__init__.py deleted file mode 100644 index 2d6389aa..00000000 --- a/dl-model-training/devcloud/keras/losses/__init__.py +++ /dev/null @@ -1,38 +0,0 @@ -# This file is MACHINE GENERATED! Do not edit. -# Generated by: tensorflow/tools/api/generator/create_python_api.py script. -"""Built-in loss functions. - -""" - -from __future__ import print_function - -from tensorflow.python.keras.losses import KLD -from tensorflow.python.keras.losses import KLD as kld -from tensorflow.python.keras.losses import KLD as kullback_leibler_divergence -from tensorflow.python.keras.losses import MAE -from tensorflow.python.keras.losses import MAE as mae -from tensorflow.python.keras.losses import MAE as mean_absolute_error -from tensorflow.python.keras.losses import MAPE -from tensorflow.python.keras.losses import MAPE as mape -from tensorflow.python.keras.losses import MAPE as mean_absolute_percentage_error -from tensorflow.python.keras.losses import MSE -from tensorflow.python.keras.losses import MSE as mean_squared_error -from tensorflow.python.keras.losses import MSE as mse -from tensorflow.python.keras.losses import MSLE -from tensorflow.python.keras.losses import MSLE as mean_squared_logarithmic_error -from tensorflow.python.keras.losses import MSLE as msle -from tensorflow.python.keras.losses import binary_crossentropy -from tensorflow.python.keras.losses import categorical_crossentropy -from tensorflow.python.keras.losses import categorical_hinge -from tensorflow.python.keras.losses import cosine -from tensorflow.python.keras.losses import cosine as cosine_proximity -from tensorflow.python.keras.losses import deserialize -from tensorflow.python.keras.losses import get -from tensorflow.python.keras.losses import hinge -from tensorflow.python.keras.losses import logcosh -from tensorflow.python.keras.losses import poisson -from tensorflow.python.keras.losses import serialize -from tensorflow.python.keras.losses import sparse_categorical_crossentropy -from tensorflow.python.keras.losses import squared_hinge - -del print_function diff --git a/dl-model-training/devcloud/keras/metrics/__init__.py b/dl-model-training/devcloud/keras/metrics/__init__.py deleted file mode 100644 index 368e5424..00000000 --- a/dl-model-training/devcloud/keras/metrics/__init__.py +++ /dev/null @@ -1,40 +0,0 @@ -# This file is MACHINE GENERATED! Do not edit. -# Generated by: tensorflow/tools/api/generator/create_python_api.py script. -"""Built-in metrics. - -""" - -from __future__ import print_function - -from tensorflow.python.keras.losses import KLD -from tensorflow.python.keras.losses import KLD as kld -from tensorflow.python.keras.losses import KLD as kullback_leibler_divergence -from tensorflow.python.keras.losses import MAE -from tensorflow.python.keras.losses import MAE as mae -from tensorflow.python.keras.losses import MAE as mean_absolute_error -from tensorflow.python.keras.losses import MAPE -from tensorflow.python.keras.losses import MAPE as mape -from tensorflow.python.keras.losses import MAPE as mean_absolute_percentage_error -from tensorflow.python.keras.losses import MSE -from tensorflow.python.keras.losses import MSE as mean_squared_error -from tensorflow.python.keras.losses import MSE as mse -from tensorflow.python.keras.losses import MSLE -from tensorflow.python.keras.losses import MSLE as mean_squared_logarithmic_error -from tensorflow.python.keras.losses import MSLE as msle -from tensorflow.python.keras.losses import binary_crossentropy -from tensorflow.python.keras.losses import categorical_crossentropy -from tensorflow.python.keras.losses import cosine -from tensorflow.python.keras.losses import cosine as cosine_proximity -from tensorflow.python.keras.losses import hinge -from tensorflow.python.keras.losses import poisson -from tensorflow.python.keras.losses import sparse_categorical_crossentropy -from tensorflow.python.keras.losses import squared_hinge -from tensorflow.python.keras.metrics import binary_accuracy -from tensorflow.python.keras.metrics import categorical_accuracy -from tensorflow.python.keras.metrics import deserialize -from tensorflow.python.keras.metrics import get -from tensorflow.python.keras.metrics import serialize -from tensorflow.python.keras.metrics import sparse_top_k_categorical_accuracy -from tensorflow.python.keras.metrics import top_k_categorical_accuracy - -del print_function diff --git a/dl-model-training/devcloud/keras/models/__init__.py b/dl-model-training/devcloud/keras/models/__init__.py deleted file mode 100644 index 6f2892b8..00000000 --- a/dl-model-training/devcloud/keras/models/__init__.py +++ /dev/null @@ -1,17 +0,0 @@ -# This file is MACHINE GENERATED! Do not edit. -# Generated by: tensorflow/tools/api/generator/create_python_api.py script. -"""Code for model cloning, plus model-related API entries. - -""" - -from __future__ import print_function - -from tensorflow.python.keras import Model -from tensorflow.python.keras import Sequential -from tensorflow.python.keras.engine.saving import load_model -from tensorflow.python.keras.engine.saving import model_from_config -from tensorflow.python.keras.engine.saving import model_from_json -from tensorflow.python.keras.engine.saving import model_from_yaml -from tensorflow.python.keras.engine.saving import save_model - -del print_function diff --git a/dl-model-training/devcloud/keras/optimizers/__init__.py b/dl-model-training/devcloud/keras/optimizers/__init__.py deleted file mode 100644 index fb197651..00000000 --- a/dl-model-training/devcloud/keras/optimizers/__init__.py +++ /dev/null @@ -1,21 +0,0 @@ -# This file is MACHINE GENERATED! Do not edit. -# Generated by: tensorflow/tools/api/generator/create_python_api.py script. -"""Built-in optimizer classes. - -""" - -from __future__ import print_function - -from tensorflow.python.keras.optimizers import Adadelta -from tensorflow.python.keras.optimizers import Adagrad -from tensorflow.python.keras.optimizers import Adam -from tensorflow.python.keras.optimizers import Adamax -from tensorflow.python.keras.optimizers import Nadam -from tensorflow.python.keras.optimizers import Optimizer -from tensorflow.python.keras.optimizers import RMSprop -from tensorflow.python.keras.optimizers import SGD -from tensorflow.python.keras.optimizers import deserialize -from tensorflow.python.keras.optimizers import get -from tensorflow.python.keras.optimizers import serialize - -del print_function diff --git a/dl-model-training/devcloud/keras/preprocessing/__init__.py b/dl-model-training/devcloud/keras/preprocessing/__init__.py deleted file mode 100644 index 51c90498..00000000 --- a/dl-model-training/devcloud/keras/preprocessing/__init__.py +++ /dev/null @@ -1,12 +0,0 @@ -# This file is MACHINE GENERATED! Do not edit. -# Generated by: tensorflow/tools/api/generator/create_python_api.py script. -"""Keras data preprocessing utils. -""" - -from __future__ import print_function - -from . import image -from . import sequence -from . import text - -del print_function diff --git a/dl-model-training/devcloud/keras/preprocessing/image/__init__.py b/dl-model-training/devcloud/keras/preprocessing/image/__init__.py deleted file mode 100644 index 8af1c052..00000000 --- a/dl-model-training/devcloud/keras/preprocessing/image/__init__.py +++ /dev/null @@ -1,28 +0,0 @@ -# This file is MACHINE GENERATED! Do not edit. -# Generated by: tensorflow/tools/api/generator/create_python_api.py script. -"""Fairly basic set of tools for real-time data augmentation on image data. - -Can easily be extended to include new transformations, -new preprocessing methods, etc... - -""" - -from __future__ import print_function - -from tensorflow.python.keras.preprocessing.image import DirectoryIterator -from tensorflow.python.keras.preprocessing.image import ImageDataGenerator -from tensorflow.python.keras.preprocessing.image import Iterator -from tensorflow.python.keras.preprocessing.image import NumpyArrayIterator -from tensorflow.python.keras.preprocessing.image import apply_transform -from tensorflow.python.keras.preprocessing.image import array_to_img -from tensorflow.python.keras.preprocessing.image import flip_axis -from tensorflow.python.keras.preprocessing.image import img_to_array -from tensorflow.python.keras.preprocessing.image import load_img -from tensorflow.python.keras.preprocessing.image import random_brightness -from tensorflow.python.keras.preprocessing.image import random_channel_shift -from tensorflow.python.keras.preprocessing.image import random_rotation -from tensorflow.python.keras.preprocessing.image import random_shear -from tensorflow.python.keras.preprocessing.image import random_shift -from tensorflow.python.keras.preprocessing.image import random_zoom - -del print_function diff --git a/dl-model-training/devcloud/keras/preprocessing/sequence/__init__.py b/dl-model-training/devcloud/keras/preprocessing/sequence/__init__.py deleted file mode 100644 index cbf23ed9..00000000 --- a/dl-model-training/devcloud/keras/preprocessing/sequence/__init__.py +++ /dev/null @@ -1,14 +0,0 @@ -# This file is MACHINE GENERATED! Do not edit. -# Generated by: tensorflow/tools/api/generator/create_python_api.py script. -"""Utilities for preprocessing sequence data. - -""" - -from __future__ import print_function - -from tensorflow.python.keras.preprocessing.sequence import TimeseriesGenerator -from tensorflow.python.keras.preprocessing.sequence import make_sampling_table -from tensorflow.python.keras.preprocessing.sequence import pad_sequences -from tensorflow.python.keras.preprocessing.sequence import skipgrams - -del print_function diff --git a/dl-model-training/devcloud/keras/preprocessing/text/__init__.py b/dl-model-training/devcloud/keras/preprocessing/text/__init__.py deleted file mode 100644 index ff61655e..00000000 --- a/dl-model-training/devcloud/keras/preprocessing/text/__init__.py +++ /dev/null @@ -1,14 +0,0 @@ -# This file is MACHINE GENERATED! Do not edit. -# Generated by: tensorflow/tools/api/generator/create_python_api.py script. -"""Utilities for text input preprocessing. - -""" - -from __future__ import print_function - -from tensorflow.python.keras.preprocessing.text import Tokenizer -from tensorflow.python.keras.preprocessing.text import hashing_trick -from tensorflow.python.keras.preprocessing.text import one_hot -from tensorflow.python.keras.preprocessing.text import text_to_word_sequence - -del print_function diff --git a/dl-model-training/devcloud/keras/regularizers/__init__.py b/dl-model-training/devcloud/keras/regularizers/__init__.py deleted file mode 100644 index a1d613c2..00000000 --- a/dl-model-training/devcloud/keras/regularizers/__init__.py +++ /dev/null @@ -1,18 +0,0 @@ -# This file is MACHINE GENERATED! Do not edit. -# Generated by: tensorflow/tools/api/generator/create_python_api.py script. -"""Built-in regularizers. - -""" - -from __future__ import print_function - -from tensorflow.python.keras.regularizers import L1L2 -from tensorflow.python.keras.regularizers import Regularizer -from tensorflow.python.keras.regularizers import deserialize -from tensorflow.python.keras.regularizers import get -from tensorflow.python.keras.regularizers import l1 -from tensorflow.python.keras.regularizers import l1_l2 -from tensorflow.python.keras.regularizers import l2 -from tensorflow.python.keras.regularizers import serialize - -del print_function diff --git a/dl-model-training/devcloud/keras/utils/__init__.py b/dl-model-training/devcloud/keras/utils/__init__.py deleted file mode 100644 index 64c3aa63..00000000 --- a/dl-model-training/devcloud/keras/utils/__init__.py +++ /dev/null @@ -1,25 +0,0 @@ -# This file is MACHINE GENERATED! Do not edit. -# Generated by: tensorflow/tools/api/generator/create_python_api.py script. -"""Keras utilities. -""" - -from __future__ import print_function - -from tensorflow.python.estimator.keras import CustomObjectScope -from tensorflow.python.keras.activations import deserialize_keras_object -from tensorflow.python.keras.applications.densenet import get_file -from tensorflow.python.keras.callbacks import Progbar -from tensorflow.python.keras.constraints import serialize_keras_object -from tensorflow.python.keras.engine.training_generator import GeneratorEnqueuer -from tensorflow.python.keras.engine.training_generator import Sequence -from tensorflow.python.keras.utils import HDF5Matrix -from tensorflow.python.keras.utils import SequenceEnqueuer -from tensorflow.python.keras.utils import convert_all_kernels_in_model -from tensorflow.python.keras.utils import custom_object_scope -from tensorflow.python.keras.utils import get_custom_objects -from tensorflow.python.keras.utils import multi_gpu_model -from tensorflow.python.keras.utils import normalize -from tensorflow.python.keras.utils import plot_model -from tensorflow.python.keras.utils import to_categorical - -del print_function diff --git a/dl-model-training/devcloud/keras/wrappers/__init__.py b/dl-model-training/devcloud/keras/wrappers/__init__.py deleted file mode 100644 index 5bef41cc..00000000 --- a/dl-model-training/devcloud/keras/wrappers/__init__.py +++ /dev/null @@ -1,10 +0,0 @@ -# This file is MACHINE GENERATED! Do not edit. -# Generated by: tensorflow/tools/api/generator/create_python_api.py script. -"""Wrappers for Keras models, providing compatibility with other frameworks. -""" - -from __future__ import print_function - -from . import scikit_learn - -del print_function diff --git a/dl-model-training/devcloud/keras/wrappers/scikit_learn/__init__.py b/dl-model-training/devcloud/keras/wrappers/scikit_learn/__init__.py deleted file mode 100644 index 49405156..00000000 --- a/dl-model-training/devcloud/keras/wrappers/scikit_learn/__init__.py +++ /dev/null @@ -1,12 +0,0 @@ -# This file is MACHINE GENERATED! Do not edit. -# Generated by: tensorflow/tools/api/generator/create_python_api.py script. -"""Wrapper for using the Scikit-Learn API with Keras models. - -""" - -from __future__ import print_function - -from tensorflow.python.keras.wrappers.scikit_learn import KerasClassifier -from tensorflow.python.keras.wrappers.scikit_learn import KerasRegressor - -del print_function