当前位置:网站首页>[mindspore] [training warning] warning when executing training code
[mindspore] [training warning] warning when executing training code
2022-07-25 00:10:00 【Xiaole happy】
1、 Use Ascend Training efficientnet The following warning appears when , Here I suspect mindspore Caused by environmental updates ( Environment from mindspore1.0.1 Updated to mindspore1.1.1), Of course, some of these warnings have been seen before , There are also some that have never been seen . Want to know why these warnings appear and what solutions are available ?
2、 Use the training model obtained from the previous environmental training (ckpt file ) Changed the updated environment (mindspore1.1.1) The previous model cannot be loaded to continue training or verify the results ( precision ).
【 Operation steps & Problem phenomenon 】
1、 For the problems described above 1, Use the updated environment mindspore1.1.1 When running training code , The following warning will appear , I have ignored similar warnings :
【1】WARNING: 'ControlDepend' is deprecated from version 1.1 and will be removed in a future version, use 'Depend' instead.
【2】[WARNING] ME(8272:140026733385536,MainProcess):2021-02-17-09:45:52.440.210 [mindspore/ops/operations/array_ops.py:2302] WARN_DEPRECATED: The usage of Pack is deprecated. Please use Stack.
【3】[WARNING] DEVICE(8272,python):2021-02-17-09:47:03.284.745 [mindspore/ccsrc/runtime/device/ascend/kernel_select_ascend.cc:282] TagRaiseReduce] node:[DropoutGenMask]reduce precision from int64 to int32
【4】[WARNING] SESSION(8272,python):2021-02-17-09:47:19.915.525 [mindspore/ccsrc/backend/session/ascend_session.cc:1412] SelectKernel] There are 1 node/nodes used reduce precision to selected the kernel!
【5】[WARNING] KERNEL(8272,python):2021-02-17-09:47:47.034.963 [mindspore/ccsrc/backend/kernel_compiler/tbe/tbe_utils.cc:58] SaveJsonInfo] Create info file failed(./kernel_meta/te_fusion_conv2d_backprop_input_d_tile_d_7453389728167276878_0.info).
【6】[WARNING] KERNEL(8272,python):2021-02-17-09:47:47.081.467 [mindspore/ccsrc/backend/kernel_compiler/tbe/tbe_utils.cc:58] SaveJsonInfo] Create info file failed(./kernel_meta/te_fusion_depthwise_conv2d_bn_training_reduce_7468152902432878638_0.info).
【7】[WARNING] DEVICE(8272,python):2021-02-17-09:50:23.020.968 [mindspore/ccsrc/runtime/device/kernel_runtime.cc:339] AssignStaticMemoryInput] It is not suggested to use a lonely weight parameter as the output of graph
2、 Answer the above question 2, Use the model file generated for the environment ( Don't worry about the wrong naming of the model file , It's just that the code name hasn't changed ) And completely unchanged code loading and running , Will report a mistake , The error message is as follows , There is no problem after trying to load and run the old environment , I wonder if mindspore There is incompatibility after the update , Some operators ( The problem I have here is the convolution operator mindspore.nn.conv2d()) The calculation method has been modified from NCHW Revised to CNHW? Do you think my judgment is correct ?
WARNING: 'ControlDepend' is deprecated from version 1.1 and will be removed in a future version, use 'Depend' instead.
[WARNING] ME(5604:140668626671424,MainProcess):2021-02-17-09:44:27.437.987 [mindspore/ops/operations/array_ops.py:2302] WARN_DEPRECATED: The usage of Pack is deprecated. Please use Stack.
[ERROR] ME(5604:140668626671424,MainProcess):2021-02-17-09:44:32.796.212 [mindspore/train/serialization.py:84] Failed to combine the net and the parameters for param blocks.0.layers.0.depth_wise_conv.0.weight.
Traceback (most recent call last):
File "train.py", line 138, in <module>
load_param_into_net(net, ckpt)
File "/root/miniconda3/envs/ci3.7/lib/python3.7/site-packages/mindspore/train/serialization.py", line 373, in load_param_into_net
_update_param(param, new_param)
File "/root/miniconda3/envs/ci3.7/lib/python3.7/site-packages/mindspore/train/serialization.py", line 87, in _update_param
raise RuntimeError(msg)
RuntimeError: Net parameters blocks.0.layers.0.depth_wise_conv.0.weight shape((32, 1, 3, 3)) different from parameter_dict's((1, 32, 3, 3))
【 Screenshot information 】
For question 1 :

For question 2 :

The error message is :net The weight in shape and ckpt There's a discrepancy in .
net in conv.0.weight Of shape by (32, 1, 3, 3),checkpoint in conv.0.weight Of shape by (1, 32, 3, 3)
If the network definition is the same , Is it across the back end , such as GPU Well trained checkpoint Got it Ascend Reasoning .
The solution is :
1、 Same as hardware training and reasoning
2、 conversion conv.0.weight Of shape, send ckpt and net Of shape matching
边栏推荐
- Internal network mapping port to external network
- Lambda&Stream
- WP wechat export chat record backup to computer
- cloud chart
- Video chat source code - one-to-one live broadcast system source code
- QT project - security monitoring system (function realization of each interface)
- Processing PDF and JPG files in VB6
- Does opengauss support using Sqlalchemy connections?
- Heap sort summary
- Tencent low code platform is officially open source! You can drag and drop and generate mobile phone projects and PC projects! Get private benefits
猜你喜欢

From the big guy baptism! 2022 headline first hand play MySQL advanced notes, and it is expected to penetrate P7

How to put long links into Excel

The new version of SSM video tutorial in shangsilicon valley was released

1、 MFC introduction

UART

UART

Weekly summary (*66): next five years

Unity+photon self made multiplayer TPS game

What can testers do when there is an online bug?

Two numbers that appear only once in the array
随机推荐
Excel file processing tool class (based on easyexcel)
What can testers do when there is an online bug?
Pit record: typeerror:'module'object is not callable
Let me introduce you to the partition automatic management of data warehouse
GUI basic application
Restructuredtext grammar summary for beginners
2022 the most NB JVM foundation to tuning notes, thoroughly understand Alibaba P6 small case
SQL result export function. If you click the work order but don't enter it, the interface is always blank and there is no response. What should you do?
Exception, import package and file operation
2022 Henan Mengxin League game 2: Henan University of technology I - 22
Horizontally centered element
Efficiency increased by 98%! AI weapon behind operation and maintenance inspection of high altitude photovoltaic power station
[acwing weekly rematch] 61st weekly 20220723
做一个文艺的测试/开发程序员,慢慢改变自己......
Yaml writing rules and comparison between yaml and JSON
Remember the problem of using redisson to step on the pit once
Install Kaspersky 2018 under win server 2012 R2
BGP related knowledge points
JS ------ Chapter 3 JS cycle
Leetcode 0123. the best time to buy and sell stocks III: dynamic programming + simulation in constant space