Edited, memorised or added to reading queue

on 01-May-2024 (Wed)

Do you want BuboFlash to help you learning these things? Click here to log in or create user.

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?],
Answer
60,000x28x28x1

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

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







Flashcard 7625839086860

Tags
#tensorflow #tensorflow-certificate
Question

import tensorflow as tf

#stop training after reaching accuract of 0.99
class MyCallback(tf.keras.callbacks.Callback):
  def on_epoch_end(self, epoch, logs={}):
    if logs.get('accuracy')>=0.99:
      print('\nAccuracy 0.99 achieved')
      self.model.stop_training = [...] 

Answer
True

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

Tensorflow - callbacks
act of 0.99 class MyCallback(tf.keras.callbacks.Callback): def on_epoch_end(self, epoch, logs={}): if logs.get('accuracy')>=0.99: print('\nAccuracy 0.99 achieved') self.model.stop_training = <span>True <span>







Flashcard 7625841184012

Tags
#tensorflow #tensorflow-certificate
Question
# global seed
tf.random.set_seed(42)

#operation seed
tf.random.[...](not_shuffled, seed=42)

Answer
shuffle

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

Tensorflow random
# global seed tf.random.set_seed(42) #operation seed tf.random.shuffle(not_shuffled, seed=42)







Flashcard 7625843019020

Tags
#tensorflow #tensorflow-certificate
Question

another_matrix = tf.constant([[10. ,66.],
                              [5. , 9.],
                              [13. , 4.]], dtype=[...])
another_matrix

Out:
<tf.Tensor: shape=(3, 2), dtype=float16, numpy=
array([[10., 66.],
       [ 5.,  9.],
       [13.,  4.]], dtype=float16)>

Answer
tf.float16

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

Tensorflow fundamentals
another_matrix = tf.constant([[10. ,66.], [5. , 9.], [13. , 4.]], dtype=tf.float16) another_matrix Out: <tf.Tensor: shape=(3, 2), dtype=float16, numpy= array([[10., 66.], [ 5., 9.], [13., 4.]], dtype=float16)>







Flashcard 7625844854028

Tags
#tensorflow #tensorflow-certificate
Question
#### Def some functions to calculate losses (mae, mse)

def evaluate_mae(y_true, y_pred):
  return tf.keras.losses.mean_absolute_error(y_true = y_true,
                                      y_pred = [...](y_pred))

Answer
tf.squeeze

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

Open it
#### Def some functions to calculate losses (mae, mse) def evaluate_mae(y_true, y_pred): return tf.keras.losses.mean_absolute_error(y_true = y_true, y_pred = tf.squeeze(y_pred))