当前位置:网站首页>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
边栏推荐
- redis
- Swiper rotates pictures and plays background music
- The large-scale application of artificial intelligence AI products in industrial-grade mature shipping ports of CIMC World Lianda will create a new generation of high-efficiency smart ports and innova
- JsonUtil基于字符串操作josn
- 延时队列优化 (2)
- 深入浅出边缘云 | 3. 资源配置
- 高精度加法
- After 23 years of operation, the former "China's largest e-commerce website" has turned yellow...
- MySQL data types
- Pytorch foundation -- tensorboard use (1)
猜你喜欢
Node encapsulates a console progress bar plugin
防抖和节流有什么区别,分别用于什么场景?
云数据库和本地数据库有什么区别?
基于inquirer封装一个控制台文件选择器
VS Code connects to SQL Server
【剑指 Offe】剑指 Offer 18. 删除链表的节点
SimpleOSS第三方库libcurl与引擎libcurl错误解决方法
6块钱1斤,日本公司为何来中国收烟头?
Meta元宇宙部门第二季度亏损28亿!仍要继续押注?元宇宙发展尚未看到出路!
NC | Tao Liang Group of West Lake University - TMPRSS2 "assists" virus infection and mediates the host invasion of Clostridium sothrix hemorrhagic toxin...
随机推荐
nlohmann json 使用指南【visual studio 2022】
【刷题篇】计算质数
redis
什么是 RESTful API?
LeetCode每日一题(1717. Maximum Score From Removing Substrings)
又一家公司面试的内容
Another company interview
高并发秒杀项目总结
Entering the applet for the first time
Scala学习:类和对象
ctf.show_web5
mysql的多实例
Delay queue optimization (2)
第4章 控制执行流程
第十七届“振兴杯”全国青年 职业技能大赛——计算机程序设计员(云计算平台与运维)参赛回顾与总结
Read the "Language Model" in one article
VBA connects Access database and Excel
设计消息队列存储消息数据的 MySQL 表格
自然语言处理nltk
实体中增加操作方法