Edited, memorised or added to reading queue

on 13-May-2024 (Mon)

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

Flashcard 7625623604492

Tags
#tensorflow #tensorflow-certificate
Question
y_test.shape, y_pred.shape, y_pred.reshape((10, )).shape, tf.squeeze(y_pred).shape


(TensorShape([10]), (10, 1), [...], TensorShape([10]))

Answer
(10,)

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

Different shapes of the tensors
y_test.shape, y_pred.shape, y_pred.reshape((10, )).shape, tf.squeeze(y_pred).shape (TensorShape([10]), (10, 1), (10,), TensorShape([10]))







Flashcard 7626829991180

Tags
#tensorflow #tensorflow-certificate
Question
changeable_tensor = tf.Variable([10, 7])

changeable_tensor[0] = 77

Output:
TypeError: 'ResourceVariable' object does not support item assignment


changeable_tensor[0].assign(77)

Output:
<tf.[...] 'UnreadVariable' shape=(2,) dtype=int32, numpy=array([77,  7], dtype=int32)>

Answer
Variable

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

Tensorflow basics
> changeable_tensor = tf.Variable([10, 7]) changeable_tensor[0] = 77 Output: TypeError: 'ResourceVariable' object does not support item assignment changeable_tensor[0].assign(77) Output: <tf.<span>Variable 'UnreadVariable' shape=(2,) dtype=int32, numpy=array([77, 7], dtype=int32)> <span>