/tensorflow-examples

tensorflow examples and experiments

Primary LanguagePythonMIT LicenseMIT

tensorflow-examples

Repository for tensorflow examples and experiments.

Examples

Installation

Python 3.6 in Visual Studio 2017

Use Visual Studio Installer -> select Modify.

Workload:

  • Install Data science and analytical applications workload

Components:

  • Install Python language support
  • Install Python 3 64-bit (e.g. 3.6.3)

Install required packages:

  • Start Visual Studio, open Python Environments
  • Select Python 3.6 (64-bit)
  • On the Overview combo box select Install from requirements.txt

Installing cuDNN

If using the gpu version of tensorflow, make sure to check which version of cuda and cuDNN is supported. Then follow the instructions on cudnn-install-windows

Cats and Dogs DataSet

The cats and dogs data set used in the examples, can be downloaded from kaggle cats and dogs.

The examples are based on splitting the training set into 3 smaller data sets:

  • Train: the first 2000 cat and the first 2000 dog images.
  • Validation: The next 1000 cat and the next 1000 dog images.
  • Test: The next 1000 cat and the next 1000 dog images.

The 3 sets should each be placed in a separate folder, with sub folders for each class (cat and dog):

  • Train: Data/Train/Cat, Data/Train/Dog.
  • Validation: Data/Validation/Cat, Data/Validation/Dog.
  • Train: Data/Test/Cat, Data/Test/Dog.

This structure will work with the keras ImageDataGenerator.flow_from_directory method.