frelam/MSAdapter:master-fix-optimizer
into master
9 months ago
Deleting a branch is permanent. It CANNOT be undone. Continue?
Dear OpenI User
Thank you for your continuous support to the Openl Qizhi Community AI Collaboration Platform. In order to protect your usage rights and ensure network security, we updated the Openl Qizhi Community AI Collaboration Platform Usage Agreement in January 2024. The updated agreement specifies that users are prohibited from using intranet penetration tools. After you click "Agree and continue", you can continue to use our services. Thank you for your cooperation and understanding.
For more agreement content, please refer to the《Openl Qizhi Community AI Collaboration Platform Usage Agreement》
之前只考虑了ParameterTuple的形式
没有考虑单个Parameter
使用Parameter.set_data的形式, 不适用assign
进入到_ms_load_state_dict这个函数里面的, 都是为了保存Parameter, 其他的不进入该函数。
修复Optimizer._ms_load_state_dict/_ms_state_dict 中, 只支持ParameterTuple, 不支持Parameter 的bug
最新的mindspore优化器, 存在Parameter的情况
这里为什么要先asnumpy再tensor初始化,直接获取params.data呢?
params是mindspore的Parameters, params.data 是用return self实现的, 还是返回Parameter
其实不asnumpy流程也是能够走通的, 主要是tensor(Parameter)用法有点奇怪而已。
还有len不相等的情况,报错内容更新一下
ok。 已经分开判断这两个条件, 分别报错。
ea4fc66b40
.