Feeding data into the trainer to optimize the neural network

We spent quite a bit of time defining our model, configuring the loss, metrics, and, finally, the learner. Now it is time to train it on our dataset. Before we can train our model, however, we need to load the dataset.

The dataset in the example code is stored as a CSV file. In order to load this dataset, we need to use a data wrangling package such as pandas. This package is included by default in your Anaconda installation. The following sample demonstrates how to use pandas to load the dataset into memory:

import pandas as pddf_source = pd.read_csv('iris.csv',     names=['sepal_length', 'sepal_width','petal_length','petal_width', 'species'],     index_col=False)

To load the dataset ...

Get Deep Learning with Microsoft Cognitive Toolkit Quick Start Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.