Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Deep Learning from the Basics

You're reading from   Deep Learning from the Basics Python and Deep Learning: Theory and Implementation

Arrow left icon
Product type Paperback
Published in Mar 2021
Publisher Packt
ISBN-13 9781800206137
Length 316 pages
Edition 1st Edition
Languages
Arrow right icon
Authors (2):
Arrow left icon
Shigeo Yushita Shigeo Yushita
Author Profile Icon Shigeo Yushita
Shigeo Yushita
Koki Saitoh Koki Saitoh
Author Profile Icon Koki Saitoh
Koki Saitoh
Arrow right icon
View More author details
Toc

Table of Contents (11) Chapters Close

Preface Introduction 1. Introduction to Python FREE CHAPTER 2. Perceptrons 3. Neural Networks 4. Neural Network Training 5. Backpropagation 6. Training Techniques 7. Convolutional Neural Networks 8. Deep Learning Appendix A

Calculating Multidimensional Arrays

If you learn how to calculate multidimensional arrays using NumPy, you will be able to implement a neural network efficiently. First, we will look at how to use NumPy to calculate multidimensional arrays. Then, we will implement a neural network.

Multidimensional Arrays

Simply put, a multidimensional array is "a set of numbers" arranged in a line, in a rectangle, in three dimensions, or (more generally) in N dimensions, called a multidimensional array. Let's use NumPy to create a multidimensional array. First, we will create a one-dimensional array, as described so far:

>>> import numpy as np
>>> A = np.array([1, 2, 3, 4])
>>> print(A)
[1 2 3 4]
>>> np.ndim(A)
1
>>> A.shape
(4,)
>>> A.shape[0]
4

As shown here, you can use the np.ndim() function to obtain the number of dimensions of an array. You can also use the instance variable, shape, to obtain the shape of the array...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image