如何将重量和偏见从较大的一层复制到较小的层(反之亦然)?
我正在研究一种遗传算法。我希望模型大小能够通过突变进行更改,并添加或去除层以及神经元的数量变化。但这使我遇到了如何使用不同尺寸的模型执行交叉的问题。
我确实有一个糟糕的解决方案已经解决了。但是我想问一下是否已经开发了一些公共方法来做这种事情。
顺便说一句,我正在Keras做这个。
I'm working on a genetic algorithm. I want the model sizes to be able to change through mutation, with layers being added or removed and the number of neurons changing. But this causes me to run into the problem of how to perform crossover with models that aren't the same size.
I do have a crappy solution already worked out. But I wanted to ask if there was some public method already developed for doing this sort of thing.
I'm doing this in Keras, by the way.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
儿童是将返回的KERAS模型。两个父模型是繁殖的模型。
child is the keras model that will be returned. The two parent models are the models being bred.