在Brain.js神经网络模型上恢复训练 [英] Resuming training on a Brain.js Neural Network Model

查看:171
本文介绍了在Brain.js神经网络模型上恢复训练的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望使用Brain.js逐步训练神经网络,但无法使用当前版本找到解决方案. 对于相同的问题也有类似的答案,但它使用了已弃用的函数参数keepNetworkIntact.怎么做?

I am looking to incrementally train a neural net using Brain.js, but can't find a solution using the current version. There is a similar answer to this same problem but it uses a deprecated function parameter keepNetworkIntact. How is this done?

推荐答案

您只需要将json导入到神经网络中,然后继续进行训练:

You simply need to import the json into the neural network, and continue training:

const net = new brain.NeuralNetwork();
net.fromJSON(json);
net.train(trainingData, trainingOptions);

该功能已被弃用,因为我们只想保持绝对必要的选项,以使api尽可能简单,并且基于导入json,网络可以确定您下一步打算做什么.

The feature was deprecated because we only want to keep the options we absolutely need to keep the api as simple as possible and based off importing json the net can determine what you intend to do next.

这篇关于在Brain.js神经网络模型上恢复训练的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆