The present disclosure relates to a neural network training method and device and an environmental processing method and device. The methods include: input the environmental state vector of the current training cycle into the neural network to obtain the action output and measurement output; determine the first reward and punishment feedback according to the environmental state vector and the action output; and determine the first reward and punishment feedback and measurement according to the first reward and punishment feedback and the first reward and punishment feedback of the historical training cycle. The output determines the model loss of the neural network, adjusts the network parameters of the neural network according to the model loss, and obtains the trained neural network when the neural network satisfies the training conditions. According to the embodiment of the present disclosure, the neural network training method determines the model loss through multiple reward and punishment feedback of the current training cycle and the historical training cycle, and is not easy to fall into the local optimal solution in the process of training the neural network, thus obtaining the neural network with higher goodness of fit.
【技术实现步骤摘要】
神经网络训练方法及装置和环境处理方法及装置
本公开涉及计算机
,尤其涉及一种神经网络训练方法及装置和环境处理方法及装置。
技术介绍
在相关技术中,可将描述当前周期的环境的环境状态向量输入神经网络中,获得动作输出和衡量输出,将动作输出作用于环境中,环境可由于所述动作输出而发生变化,获得下一个周期的环境,同时获得对该动作输出的奖惩反馈。根据该奖惩反馈来确定神经网络的损失函数,以训练神经网络。但该训练方法根据单一的奖惩反馈来确定损失函数,容易使训练过程陷入局部最优解,难以获得拟合优度较高的神经网络。
技术实现思路
本公开提出了一种神经网络训练方法及装置和环境处理方法及装置。根据本公开的一方面,提供了一种神经网络训练方法,包括:将当前训练周期的环境状态向量输入神经网络中进行处理,获得当前训练周期的动作输出和当前训练周期的衡量输出;根据所述当前训练周期的环境状态向量和所述当前训练周期的动作输出,确定当前训练周期的第一奖惩反馈;根据所述当前训练周期的第一奖惩反馈、历史训练周期的第一奖惩反馈和当前训练周期的衡量输出,确定所述神经网络的模型损失,所述历史训练周期包括在所述当前训 ...
【技术保护点】
1.一种神经网络训练方法,其特征在于,所述方法包括:将当前训练周期的环境状态向量输入神经网络中进行处理,获得当前训练周期的动作输出和当前训练周期的衡量输出;根据所述当前训练周期的环境状态向量和所述当前训练周期的动作输出,确定当前训练周期的第一奖惩反馈;根据所述当前训练周期的第一奖惩反馈、历史训练周期的第一奖惩反馈和当前训练周期的衡量输出,确定所述神经网络的模型损失,所述历史训练周期包括在所述当前训练周期之前的一个或多个训练周期;根据所述模型损失,调整所述神经网络的网络参数值;在所述神经网络满足训练条件时,获得训练后的神经网络。
【技术特征摘要】
1.一种神经网络训练方法,其特征在于,所述方法包括:将当前训练周期的环境状态向量输入神经网络中进行处理,获得当前训练周期的动作输出和当前训练周期的衡量输出;根据所述当前训练周期的环境状态向量和所述当前训练周期的动作输出,确定当前训练周期的第一奖惩反馈;根据所述当前训练周期的第一奖惩反馈、历史训练周期的第一奖惩反馈和当前训练周期的衡量输出,确定所述神经网络的模型损失,所述历史训练周期包括在所述当前训练周期之前的一个或多个训练周期;根据所述模型损失,调整所述神经网络的网络参数值;在所述神经网络满足训练条件时,获得训练后的神经网络。2.根据权利要求1所述的方法,其特征在于,所述当前周期的衡量输出包括当前训练周期的第一衡量输出和当前训练周期的第二衡量输出。3.根据权利要求2所述的方法,其特征在于,所述模型损失包括与所述第一衡量输出对应的第一模型损失、与所述第二衡量输出对应的第二模型损失以及与所述动作输出对应的第三模型损失。4.一种环境处理方法,其特征在于,所述方法包括:将当前周期的环境状态向量输入权利要求1至3中任意一项所述的神经网络中进行处理,获得当前周期的动作输出;根据当前周期的环境状态向量以及所述当前周期的动作输出,确定当前周期的下一个周期的环境状态向量以及当前周期的第一奖惩反馈。5.一种神经网络训练装置,其特征在于,包括:输入模块,用于将当前训练周期的环境状态向量输入神经网络中进行处理,获得当前训练周期的动作输出和当前训练周期的衡量输出;反馈确定模块,用于根...
【专利技术属性】
技术研发人员:邓煜彬,余可,吕健勤,林达华,汤晓鸥,
申请(专利权)人:北京市商汤科技开发有限公司,
类型:发明
国别省市:北京,11
还没有人留言评论。发表了对其他浏览者有用的留言会获得科技券。