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_trainandY_trainare also provided in the shape of (C, m). However, whenforward_propagation()andcompute_total_loss()are called frommodel(), the transposed versions ofX_trainandY_trainare 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_trainandY_trainare fed totf.data.Datasetand used to create mini-batches. Doestf.data.Datasetortf.data.Dataset.batchsomehow change the shape ofX_trainandY_train? -
I also noticed that
X_testandY_testare turned into atf.data.Datasetobject 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