Hands-On Neural Network Programming with C#
eBook - ePub

Hands-On Neural Network Programming with C#

Add powerful neural network capabilities to your C# enterprise applications

Matt R. Cole

  1. 328 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Hands-On Neural Network Programming with C#

Add powerful neural network capabilities to your C# enterprise applications

Matt R. Cole

Book details
Book preview
Table of contents
Citations

About This Book

Create and unleash the power of neural networks by implementing C# and.Net code

Key Features

  • Get a strong foundation of neural networks with access to various machine learning and deep learning libraries
  • Real-world case studies illustrating various neural network techniques and architectures used by practitioners
  • Cutting-edge coverage of Deep Networks, optimization algorithms, convolutional networks, autoencoders and many more

Book Description

Neural networks have made a surprise comeback in the last few years and have brought tremendous innovation in the world of artificial intelligence.

The goal of this book is to provide C# programmers with practical guidance in solving complex computational challenges using neural networks and C# libraries such as CNTK, and TensorFlowSharp. This book will take you on a step-by-step practical journey, covering everything from the mathematical and theoretical aspects of neural networks, to building your own deep neural networks into your applications with the C# and.NET frameworks.

This book begins by giving you a quick refresher of neural networks. You will learn how to build a neural network from scratch using packages such as Encog, Aforge, and Accord. You will learn about various concepts and techniques, such as deep networks, perceptrons, optimization algorithms, convolutional networks, and autoencoders. You will learn ways to add intelligent features to your.NET apps, such as facial and motion detection, object detection and labeling, language understanding, knowledge, and intelligent search.

Throughout this book, you will be working on interesting demonstrations that will make it easier to implement complex neural networks in your enterprise applications.

What you will learn

  • Understand perceptrons and how to implement them in C#
  • Learn how to train and visualize a neural network using cognitive services
  • Perform image recognition for detecting and labeling objects using C# and TensorFlowSharp
  • Detect specific image characteristics such as a face using Accord.Net
  • Demonstrate particle swarm optimization using a simple XOR problem and Encog
  • Train convolutional neural networks using ConvNetSharp
  • Find optimal parameters for your neural network functions using numeric and heuristic optimization techniques.

Who this book is for

This book is for Machine Learning Engineers, Data Scientists, Deep Learning Aspirants and Data Analysts who are now looking to move into advanced machine learning and deep learning with C#. Prior knowledge of machine learning and working experience with C# programming is required to take most out of this book

Frequently asked questions

How do I cancel my subscription?
Simply head over to the account section in settings and click on “Cancel Subscription” - it’s as simple as that. After you cancel, your membership will stay active for the remainder of the time you’ve paid for. Learn more here.
Can/how do I download books?
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
What is the difference between the pricing plans?
Both plans give you full access to the library and all of Perlego’s features. The only differences are the price and subscription period: With the annual plan you’ll save around 30% compared to 12 months on the monthly plan.
What is Perlego?
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Do you support text-to-speech?
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Is Hands-On Neural Network Programming with C# an online PDF/ePUB?
Yes, you can access Hands-On Neural Network Programming with C# by Matt R. Cole in PDF and/or ePUB format, as well as other popular books in Ciencia de la computación & Redes neuronales. We have over one million books available in our catalogue for you to explore.

Information

Year
2018
ISBN
9781789619867

Function Optimizations: How and Why

bAnd now it's time to have some fun. We are going to develop a very powerful, three-dimensional application that you won't find anywhere else. This application will allow you to visualize how individual functions optimize over time, with a two and three-dimensional graphic of each. The source code for this application is located in the instructions given for access of the book's source code. This application will be very unique in that we will use a mixture of open source and third-party controls to create an unbelievably powerful application. Open source doesn't handle everything all the time, and for those of you serious about graphics I wanted to expose you to some controls aside from the open source standards such as ZedGraph, Microsoft Charting Controls, and others. As you will see in a moment, the difference is astounding and worth the ride. You can decide later if you want to change anything back to completely open source.
We are also going to show you how we can use Particle Swarm Optimization to enhance visualizations of function optimizations. By doing so you will see how each particle in the swarm converges to the optimal solution.
In this chapter, we are going to accomplish the following:
  • Build a Visual Studio WinForms project
  • Create a function optimization tester
  • Implement graphic controls for our visualizations
  • Talk about various third-party controls used in this project
  • Learn about the various hyperparameters available
  • Learn to tune and adjust hyperparameters
  • Learn the effect of adjusting hyperparameters
  • Learn about the purpose of functions
  • Learn how to add new functions
  • Demonstrate adding a new function and running a test

Technical requirements

You will be required to have a basic knowledge of .NET development using Microsoft Visual Studio and C#. You will need to download the code for this chapter from the book's website.
Check out the following video to see Code in Action: http://bit.ly/2ppBmvI.

Getting started

Before we get started, let me show you the product we are going to create. When we are done you will have an application that allows you to view graphically how a function minimizes or maximizes over iterations. This is contrary to the typical text-based representations of such systems, as follows:
3D Plot
As you can see, this is a very visual application. Let's go ahead and break this down into sections that we will refer to as we progress.
The first section is the three-dimensional plot and is located on our main page. Three dimensions can provide much more insight into the path that each particle in the swarm takes, and the swarm itself is taking. It is also much easier to see when a particle or the swarm converges on the global minimum. For this plot we will use the incredible Nevron chart control. You can find more information about this Chart control at https://www.nevron.com/products-open-vision-nov-chart-control-overview.aspx. The main user interface is developed with DotNetBar. For those looking for a different user interface with all the bells and whistles such as crumbbars, tabs, grids, listviews, charts, sparklines, and more, this is a great and more affordable choice than say Infragistics or DevExpress. You can find more information about this suite of controls at http://www.devcomponents.com/dotnetbar/
Main Page
The second section is the two-dimensional plot, and is located on our fourth page, the Charts tab. Some people would also call this type of plot a spaghetti plot. Its job is to plot the swarm on a two-dimensional plane. For this plot we will use the Microsoft Chart control. As you can see, this control becomes very busy when trying to plot on a two-dimensional surface. The more particles in the swarm that you have, the busier your chart will become:
2D Visualization
The third section is the information tree, and is located on our third page, the Details tab. This tree houses detailed information from each iteration. The total number of iterations is a hyperparameter we will discuss shortly. Each iteration will track all swarm particle information such as position, speed, best position, and fitness, as follows:
Informatio...

Table of contents

  1. Title Page
  2. Copyright and Credits
  3. Dedication
  4. Packt Upsell
  5. Contributors
  6. Preface
  7. A Quick Refresher
  8. Building Our First Neural Network Together
  9. Decision Trees and Random Forests
  10. Face and Motion Detection
  11. Training CNNs Using ConvNetSharp
  12. Training Autoencoders Using RNNSharp
  13. Replacing Back Propagation with PSO
  14. Function Optimizations: How and Why
  15. Finding Optimal Parameters
  16. Object Detection with TensorFlowSharp
  17. Time Series Prediction and LSTM Using CNTK
  18. GRUs Compared to LSTMs, RNNs, and Feedforward networks
  19. Activation Function Timings
  20. Function Optimization Reference
  21. Other Books You May Enjoy
Citation styles for Hands-On Neural Network Programming with C#

APA 6 Citation

Cole, M. (2018). Hands-On Neural Network Programming with C# (1st ed.). Packt Publishing. Retrieved from https://www.perlego.com/book/825766/handson-neural-network-programming-with-c-add-powerful-neural-network-capabilities-to-your-c-enterprise-applications-pdf (Original work published 2018)

Chicago Citation

Cole, Matt. (2018) 2018. Hands-On Neural Network Programming with C#. 1st ed. Packt Publishing. https://www.perlego.com/book/825766/handson-neural-network-programming-with-c-add-powerful-neural-network-capabilities-to-your-c-enterprise-applications-pdf.

Harvard Citation

Cole, M. (2018) Hands-On Neural Network Programming with C#. 1st edn. Packt Publishing. Available at: https://www.perlego.com/book/825766/handson-neural-network-programming-with-c-add-powerful-neural-network-capabilities-to-your-c-enterprise-applications-pdf (Accessed: 14 October 2022).

MLA 7 Citation

Cole, Matt. Hands-On Neural Network Programming with C#. 1st ed. Packt Publishing, 2018. Web. 14 Oct. 2022.