当前位置:网站首页>MindSpore:mindspore有没有类似tf.GradientTape()用来求解梯度的?
MindSpore:mindspore有没有类似tf.GradientTape()用来求解梯度的?
2022-07-30 19:04:00 【小乐快乐】
问题描述:
MindSpore:mindspore有没有类似tf.GradientTape()用来求解梯度的?
方案解决:
在教程的快速入门页面有自动微分教程。其中可以通过sens_param参数对网络的输出值做缩放以改变最终梯度。首先将ops.GradOperation中的sens_param设置为True,并确定缩放指数,其维度与输出维度保持一致。
如果有其他使用问题欢迎继续提问,谢谢。
https://www.mindspore.cn/tutorial/zh-CN/r1.2/autograd.html
边栏推荐
猜你喜欢

【Pointing to Offer】Pointing to Offer 18. Delete the node of the linked list

攻防世界web-Cat

Critical Reviews | 南农邹建文组综述全球农田土壤抗生素与耐药基因分布

Talking about Contrastive Learning (Contrastive Learning) the first bullet

Does the satellite phone communicate directly with the satellite or through a ground station?

Deepen school-enterprise cooperation and build an "overpass" for the growth of technical and skilled talents

延时队列优化 (2)

VBA connects Access database and Excel

scrapy基本使用

After 23 years of operation, the former "China's largest e-commerce website" has turned yellow...
随机推荐
电脑死机的时候,发生了什么?
Vulkan开启特征(feature)的正确姿势
【Pointing to Offer】Pointing to Offer 18. Delete the node of the linked list
第一次进入小程序判断
浅聊对比学习(Contrastive Learning)第一弹
Correct pose of Vulkan open feature
Swiper轮播图片并播放背景音乐
SimpleOSS third-party library libcurl and engine libcurl error solution
requet.getHeader(“token“) 为null
【hbuilder】运行不了部分项目 , 打开终端 无法输入指令
VBA batch import Excel data into Access database
mysql的多实例
natural language processing nltk
已删除
6块钱1斤,日本公司为何来中国收烟头?
二分答案裸题(加一点鸽巢原理)
Delay queue optimization (2)
Fixed asset visualization intelligent management system
【Swords Offer】Swords Offer 17. Print n digits from 1 to the largest
设计消息队列存储消息数据的 MySQL 表格