def __init__(self, *args, **kwargs):
self.model = Sequential([
Dense(10, activation="relu", input_shape=(2,)),
Dense(10, activation="relu"),
Dense(2)
])
self.model.compile("sgd", "mse", metrics=["mae"])
x1 = Input(shape=(10,))
x2 = Input(shape=(10,))
y = dot([
Dense(10)(x1),
Dense(10)(x2)
], axes=1)
self.model2 = Model(inputs=[x1, x2], outputs=y)
self.model2.compile(loss="mse", optimizer="adam")
super(TestTraining, self).__init__(*args, **kwargs)
评论列表
文章目录