且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Keras-历时相关的损失函数

更新时间:2023-12-02 14:13:16

这可以通过重新编译网络来完成.保存的权重不会因重新编译而改变.所以本质上是这样的:

This can be accomplished by recompiling the network. The weights are saved not changed by the recompilation. So in essence something like this:

for epoch in range(nb_epoch):
     loss_function = loss_for_epoch(epoch)
     model.compile(optimizer, loss_function, metrics)
     model.fit(X, y, nb_epoch=1)