# on 19-Apr-2024 (Fri)

#### Flashcard 7624066993420

Tags
#tensorflow #tensorflow-certificate
Question

from tensorflow.keras import Sequential
from tensorflow.keras.layers import Dense
import numpy as np

model = Sequential(Dense(1, input_shape=[1]))
model.[...](optimizer='sgd', loss='mean_squared_error')
xs = np.array([1,5,12,-1,10], dtype=float)
ys = np.array([5,13,27,1,23], dtype=float)
model.fit(xs, ys, epochs=500)
model.predict(x=[15])

compile

status measured difficulty not learned 37% [default] 0

Tensorflow basics - typical flow of model building
from tensorflow.keras import Sequential from tensorflow.keras.layers import Dense import numpy as np model = Sequential(Dense(1, input_shape=[1])) model.compile(optimizer='sgd', loss='mean_squared_error') xs = np.array([1,5,12,-1,10], dtype=float) ys = np.array([5,13,27,1,23], dtype=float) model.fit(xs, ys, epochs=500) model.predict(x=[15]) </s

#### Flashcard 7624232144140

Tags
#tensorflow #tensorflow-certificate
Question
# Create matrix
another_matrix = tf.constant([[10. ,66.],
[5. , 9.],
[13. , 4.]], dtype=tf.float16)
another_matrix

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

another_matrix.ndim
2

(3, 2)

status measured difficulty not learned 37% [default] 0

Tensors fundamentals - creating tensors
# Create matrix another_matrix = tf.constant([[10. ,66.], [5. , 9.], [13. , 4.]], dtype=tf.float16) another_matrix <tf.Tensor: shape=(3, 2), dtype=float16, numpy= array([[10., 66.], [ 5., 9.], [13., 4.]], dtype=float16)> another_matrix.ndim 2

#### 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.