After reading the function model()
in Lab Assignment 3.3, a few questions came up:
Let C = number of features, m = number of samples
-
In previous sections, we implemented two functions:
forward_propagation()
andcompute_total_loss()
. In both of these functions, the shape of inputs are both (C, m). In functionmodel()
, the inputsX_train
andY_train
are also provided in the shape of (C, m). However, whenforward_propagation()
andcompute_total_loss()
are called frommodel()
, the transposed versions ofX_train
andY_train
are passed as arguments. Callingtr.transpose(X_train)
andtr.transpose(Y_train)
will change their shapes to (m, C), which is not whatforward_propagation()
andcompute_total_loss()
expect. -
I know that
X_train
andY_train
are fed totf.data.Dataset
and used to create mini-batches. Doestf.data.Dataset
ortf.data.Dataset.batch
somehow change the shape ofX_train
andY_train
? -
I also noticed that
X_test
andY_test
are turned into atf.data.Dataset
object and mini-batches are created from this. What are the reasons behind splitting the test (I assume test here means Validation)? The test mini-batches are used in predictions every 10 training epochs. What is the disadvantage of treating the test/validation set one batch?
Thanks