遗传算法训练神经网络_使用遗传算法训练神经网络

本文探讨了如何利用遗传算法来训练神经网络,通过介绍一篇来源于Towards Data Science的文章,展示了在深度学习中采用遗传算法的独特方法,以优化模型的训练过程。
摘要由CSDN通过智能技术生成

遗传算法训练神经网络

Many people use genetic algorithms as unsupervised algorithms, to optimize agents in certain environments, but do not realize that the implementation of neural networks into the agents as a possibility.

许多人将遗传算法用作无监督算法,以在某些环境中优化代理,但没有意识到将神经网络实施到代理中的可能性。

什么是遗传算法? (What are genetic algorithms?)

Genetic Algorithms are a type of learning algorithm, that uses the idea that crossing over the weights of two good neural networks, would result in a better neural network.

遗传算法是一种学习算法,其使用这样的思想:跨越两个良好的神经网络的权重将产生一个更好的神经网络。

The reason that genetic algorithms are so effective is because there is no direct optimization algorithm, allowing for the possibility to have extremely varied results. Additionally, they often come up with very interesting solutions that often give valuable insight into the problem.

遗传算法之所以如此有效,是因为没有直接的优化算法,从而可能产生极为不同的结果。 此外,他们经常想出非常有趣的解决方案,这些解决方案通常可以为问题提供有价值的见解。

它们如何工作? (How do they work?)

A set of random weights are generated. This is the neural network of the first agent. A set of tests are performed on the agent. The agent receives a score based on the tests. Repeat this several times to create a population.Select the top 10% of the population to be available to crossover. Two random parents are chosen from the top 10% and their weights are crossover. Every time a crossover occurs, there is a small chance of mutation: That is a random value that is in neither of the parent’s weights.

生成一组随机权重。 这是第一个代理的神经网络。 在代理上执行了一组测试。 代理会根据测试获得分数。 重复几次以创建种群。选择种群的前10%以进行交叉。 从最高的10%中选择两个随机的父母,他们的权重是交叉的。 每次发生交叉时,发生突变的可能性都很小:这是一个随机值,它不受父母的影响。

This process slowly optimizes the agent’s performance, as the agents slowly adapt to the environment.

随着代理慢慢适应环境,此过程将缓慢优化代理的性能。

的优点和缺点: (Advantages and Disadvantages:)

Advantages:

优点:

  • Computationally not intensive

    计算不密集

There are no linear algebra calculations to be done. The only machine learning calculations necessary are forward passes through the neural networks. Because of this, the system requirements are very broad, as compared to Deep Neural Networks.

没有线性代数计算要完成。 唯一必要的机器学习计算是通过神经网络的正向传递。 因此,与深度神经网络相比,系统要求非常广泛。

  • Adaptable

    适应性强

One could adapt and insert many different tests and ways to manipulate the flexible nature of genetic algorithms. One could

  • 0
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值