From the course: Machine Learning and AI in Cybersecurity by Pearson

Unlock this course with a free trial

Join today to access over 25,300 courses taught by industry experts.

More with TensorFlow

More with TensorFlow

Now that we've talked a bit about machine learning and TensorFlow, and we've looked at some sample code, let's go just a little bit further. Obviously, to do machine learning, you have to have some input data. Data can come from all kinds of sources. We just saw an example where you simply imported data from a public data source. You may often get data in CSV files, Excel files, text files, databases, whatever. Well, with TensorFlow, you need to pass an input function during training. This is used to get in the data, and you can see here a generic example. Now, if the data is already in the NumPy format, then we're a step beyond that. If not, we'll have to put it in the right format, and we'll see examples of that. Once the data is in the proper format, we'll see functions like you see here, which are doing input, looking at the batch size, the number of epochs, which we saw just a moment ago, that sort of thing. Now, as we move forward, you'll be building layers. In this case, we…

Contents