# on 18-Apr-2024 (Thu)

#### Flashcard 7624361381132

Tags
#tensorflow #tensorflow-certificate
Question
# Tensors can be indexed just like Python lists.

# Get the first 2 elements of each dimension (this is 4D tensor)
A[[...]]

:2, :2, :2, :2

status measured difficulty not learned 37% [default] 0

Tensors indexing
# Tensors can be indexed just like Python lists. # Get the first 2 elements of each dimension A[:2, :2, :2, :2]

#### Annotation 7624619330828

 Matrix multiplication #algebra #matrix #tensorflow #tensorflow-certificate In General: To multiply an m×n matrix by an n×p matrix, the ns must be the same, and the result is an m×p matrix.

#### Flashcard 7624621165836

Tags
#algebra #matrix #tensorflow #tensorflow-certificate
Question

In General:

To multiply an m×n matrix by an n×p matrix, the [...]s must be the same,
and the result is an m×p matrix.

n

status measured difficulty not learned 37% [default] 0

Matrix multiplication
In General: To multiply an m×n matrix by an n×p matrix, the ns must be the same, and the result is an m×p matrix.

#### Flashcard 7624622738700

Tags
#algebra #matrix #tensorflow #tensorflow-certificate
Question

In General:

To multiply an m×n matrix by an n×p matrix, the ns must be the same,
and the result is an [...] matrix.

m×p

status measured difficulty not learned 37% [default] 0

Matrix multiplication
In General: To multiply an m×n matrix by an n×p matrix, the ns must be the same, and the result is an m×p matrix.

#### Annotation 7624630603020

 Convolution Neural Network - introduction #conv2D #convolution #tensorflow #tensorflow-certificate Step 1 is to gather the data. You'll notice that there's a bit of a change here in that the training data needed to be reshaped. That's because the first convolution expects a single tensor containing everything, so instead of 60,000 28x28x1 items in a list, we have a single 4D list that is 60,000x28x28x1, and the same for the test images. If you don't do this, you'll get an error when training as the Convolutions do not recognize the shape. import tensorflow as tf mnist = tf.keras.datasets.fashion_mnist (training_images, training_labels), (test_images, test_labels) = mnist.load_data() training_images=training_images.reshape(60000, 28, 28, 1) training_images=training_images / 255.0 model = tf.keras.models.Sequential([ tf.keras.layers.Conv2D(64, (3,3), activation='relu', input_shape=(28, 28, 1)), tf.keras.layers.MaxPooling2D(2, 2), tf.keras.layers.Conv2D(64, (3,3), activation='relu'), tf.keras.layers.MaxPooling2D(2, 2), tf.keras.layers.Flatten(), tf.keras.layers.Dense(128, activation='relu'), tf.keras.layers.Dense(10, activation='softmax') ])

#### Annotation 7624632700172

 #conv2D #convolution #tensorflow #tensorflow-certificate Step 1 is to gather the data. You'll notice that there's a bit of a change here in that the training data needed to be reshaped. That's because the first convolution expects a single tensor containing everything, so instead of 60,000 28x28x1 items in a list, we have a single 4D list that is 60,000x28x28x1,

Convolution Neural Network - introduction
Step 1 is to gather the data. You'll notice that there's a bit of a change here in that the training data needed to be reshaped. That's because the first convolution expects a single tensor containing everything, so instead of 60,000 28x28x1 items in a list, we have a single 4D list that is 60,000x28x28x1, and the same for the test images. If you don't do this, you'll get an error when training as the Convolutions do not recognize the shape. import tensorflow as tf mnist = tf.keras.datase

#### Flashcard 7624634273036

Tags
#conv2D #convolution #tensorflow #tensorflow-certificate
Question
Step 1 is to gather the data. You'll notice that there's a bit of a change here in that the training data needed to be reshaped. That's because the first convolution expects a single tensor containing everything, so instead of [...] items in a list, we have a single 4D list that is 60,000x28x28x1,
60,000 28x28x1

status measured difficulty not learned 37% [default] 0

#### Parent (intermediate) annotation

Open it
'll notice that there's a bit of a change here in that the training data needed to be reshaped. That's because the first convolution expects a single tensor containing everything, so instead of <span>60,000 28x28x1 items in a list, we have a single 4D list that is 60,000x28x28x1, <span>

#### Original toplevel document

Convolution Neural Network - introduction
Step 1 is to gather the data. You'll notice that there's a bit of a change here in that the training data needed to be reshaped. That's because the first convolution expects a single tensor containing everything, so instead of 60,000 28x28x1 items in a list, we have a single 4D list that is 60,000x28x28x1, and the same for the test images. If you don't do this, you'll get an error when training as the Convolutions do not recognize the shape. import tensorflow as tf mnist = tf.keras.datase

#### Flashcard 7624635845900

Tags
#conv2D #convolution #tensorflow #tensorflow-certificate
Question
Step 1 is to gather the data. You'll notice that there's a bit of a change here in that the training data needed to be reshaped. That's because the first convolution expects a single tensor containing everything, so instead of 60,000 28x28x1 items in a list, we have a single 4D list that is [...size?],
60,000x28x28x1

status measured difficulty not learned 37% [default] 0

#### Parent (intermediate) annotation

Open it
ng data needed to be reshaped. That's because the first convolution expects a single tensor containing everything, so instead of 60,000 28x28x1 items in a list, we have a single 4D list that is <span>60,000x28x28x1, <span>

#### Original toplevel document

Convolution Neural Network - introduction
Step 1 is to gather the data. You'll notice that there's a bit of a change here in that the training data needed to be reshaped. That's because the first convolution expects a single tensor containing everything, so instead of 60,000 28x28x1 items in a list, we have a single 4D list that is 60,000x28x28x1, and the same for the test images. If you don't do this, you'll get an error when training as the Convolutions do not recognize the shape. import tensorflow as tf mnist = tf.keras.datase

#### Annotation 7624640302348

 Loss function for multiclass classification #tensorflow #tensorflow-certificate # MNIST DATA SET - multiclass classification model.compile(optimizer='adam', loss='sparse_categorical_crossentropy', metrics=['accuracy']) model.summary() model.fit(training_images, training_labels, epochs=20, callbacks=[my_callback]) model.evaluate(test_images, test_labels) # YOUR CODE ENDS HERE

#### Flashcard 7624642137356

Tags
#tensorflow #tensorflow-certificate
Question

#MNIST DATA SET - 9-class classification problem