Hello mentor, in lab 1 of week 4, a wide and deep model is defined as
# inherit from the Model base class
class WideAndDeepModel(Model):
def __init__(self, units=30, activation='relu', **kwargs):
'''initializes the instance attributes'''
super().__init__(**kwargs)
self.hidden1 = Dense(units, activation=activation)
self.hidden2 = Dense(units, activation=activation)
self.main_output = Dense(1)
self.aux_output = Dense(1)
def call(self, inputs):
'''defines the network architecture'''
input_A, input_B = inputs
hidden1 = self.hidden1(input_B)
hidden2 = self.hidden2(hidden1)
concat = concatenate([input_A, hidden2])
main_output = self.main_output(concat)
aux_output = self.aux_output(hidden2)
return main_output, aux_output
I then tried to use the model.summary()
to show its layer, while it got an error on the input shape as:
Would you explain why the dim of the shape must be 4 ? Thanks.