test_training.py 文件源码

python
阅读 30 收藏 0 点赞 0 评论 0

项目:importance-sampling 作者: idiap 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号