ChengpengChen / RepGhost

RepGhost: A Hardware-Efficient Ghost Module via Re-parameterization
MIT License
168 stars 17 forks source link

Got an error when using Converted Model for inference #9

Closed Choneke closed 1 year ago

Choneke commented 1 year ago

Hi, I trained the model on my dataset, and then convert it for inference using fille convert.py with the command " python convert.py load TRAINEDMODEL/best_repghost.pkl -m repghost.repghostnet". However, during conversion got the following message and the model converted as when I look on the two models the size (in MB) are different between the original model and the converted one.

=> no checkpoint found at 'load'
=> saved checkpoint to 'TRAINEDMODEL/best_wts_repghost0.5_converted.pkl'

When I use the original model for inference, there is no any error message, but when I use the converted model I got the following error message. Can you help me to solve the issue?

model.load_state_dict(torch.load("best_wts_repghost0.5_converted.pkl"))
  File "C:\Users\admin\anaconda3\envs\repghstnet\lib\site-packages\torch\nn\modules\module.py", line 1223, in load_state_dict
    raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
RuntimeError: Error(s) in loading state_dict for RepGhostNet:
        Missing key(s) in state_dict: "blocks.0.0.ghost1.fusion_bn.0.weight", "blocks.0.0.ghost1.fusion_bn.0.bias", "blocks.0.0.ghost1.fusion_bn.0.running_mean", "blocks.0.0.ghost1.fusion_bn.0.running_var", "blocks.0.0.ghost1.cheap_operation.0.weight", "blocks.0.0.ghost1.cheap_operation.1.weight", "blocks.0.0.ghost1.cheap_operation.1.bias", "blocks.0.0.ghost1.cheap_operation.1.running_mean", "blocks.0.0.ghost1.cheap_operation.1.running_var", "blocks.0.0.ghost2.fusion_bn.0.weight", "blocks.0.0.ghost2.fusion_bn.0.bias", "blocks.0.0.ghost2.fusion_bn.0.running_mean", "blocks.0.0.ghost2.fusion_bn.0.running_var", "blocks.0.0.ghost2.cheap_operation.0.weight", "blocks.0.0.ghost2.cheap_operation.1.weight", "blocks.0.0.ghost2.cheap_operation.1.bias", "blocks.0.0.ghost2.cheap_operation.1.running_mean", "blocks.0.0.ghost2.cheap_operation.1.running_var", "blocks.1.0.ghost1.fusion_bn.0.weight", "blocks.1.0.ghost1.fusion_bn.0.bias", "blocks.1.0.ghost1.fusion_bn.0.running_mean", "blocks.1.0.ghost1.fusion_bn.0.running_var", "blocks.1.0.ghost1.cheap_operation.0.weight", "blocks.1.0.ghost1.cheap_operation.1.weight", "blocks.1.0.ghost1.cheap_operation.1.bias", "blocks.1.0.ghost1.cheap_operation.1.running_mean", "blocks.1.0.ghost1.cheap_operation.1.running_var", "blocks.1.0.ghost2.fusion_bn.0.weight", "blocks.1.0.ghost2.fusion_bn.0.bias", "blocks.1.0.ghost2.fusion_bn.0.running_mean", "blocks.1.0.ghost2.fusion_bn.0.running_var", "blocks.1.0.ghost2.cheap_operation.0.weight", "blocks.1.0.ghost2.cheap_operation.1.weight", "blocks.1.0.ghost2.cheap_operation.1.bias", "blocks.1.0.ghost2.cheap_operation.1.running_mean", "blocks.1.0.ghost2.cheap_operation.1.running_var", "blocks.2.0.ghost1.fusion_bn.0.weight", "blocks.2.0.ghost1.fusion_bn.0.bias", "blocks.2.0.ghost1.fusion_bn.0.running_mean", "blocks.2.0.ghost1.fusion_bn.0.running_var", "blocks.2.0.ghost1.cheap_operation.0.weight", "blocks.2.0.ghost1.cheap_operation.1.weight", "blocks.2.0.ghost1.cheap_operation.1.bias", "blocks.2.0.ghost1.cheap_operation.1.running_mean", "blocks.2.0.ghost1.cheap_operation.1.running_var", "blocks.2.0.ghost2.fusion_bn.0.weight", "blocks.2.0.ghost2.fusion_bn.0.bias", "blocks.2.0.ghost2.fusion_bn.0.running_mean", "blocks.2.0.ghost2.fusion_bn.0.running_var", "blocks.2.0.ghost2.cheap_operation.0.weight", "blocks.2.0.ghost2.cheap_operation.1.weight", "blocks.2.0.ghost2.cheap_operation.1.bias", "blocks.2.0.ghost2.cheap_operation.1.running_mean", "blocks.2.0.ghost2.cheap_operation.1.running_var", "blocks.3.0.ghost1.fusion_bn.0.weight", "blocks.3.0.ghost1.fusion_bn.0.bias", "blocks.3.0.ghost1.fusion_bn.0.running_mean", "blocks.3.0.ghost1.fusion_bn.0.running_var", "blocks.3.0.ghost1.cheap_operation.0.weight", "blocks.3.0.ghost1.cheap_operation.1.weight", "blocks.3.0.ghost1.cheap_operation.1.bias", "blocks.3.0.ghost1.cheap_operation.1.running_mean", "blocks.3.0.ghost1.cheap_operation.1.running_var", "blocks.3.0.ghost2.fusion_bn.0.weight", "blocks.3.0.ghost2.fusion_bn.0.bias", "blocks.3.0.ghost2.fusion_bn.0.running_mean", "blocks.3.0.ghost2.fusion_bn.0.running_var", "blocks.3.0.ghost2.cheap_operation.0.weight", "blocks.3.0.ghost2.cheap_operation.1.weight", "blocks.3.0.ghost2.cheap_operation.1.bias", "blocks.3.0.ghost2.cheap_operation.1.running_mean", "blocks.3.0.ghost2.cheap_operation.1.running_var", "blocks.4.0.ghost1.fusion_bn.0.weight", "blocks.4.0.ghost1.fusion_bn.0.bias", "blocks.4.0.ghost1.fusion_bn.0.running_mean", "blocks.4.0.ghost1.fusion_bn.0.running_var", "blocks.4.0.ghost1.cheap_operation.0.weight", "blocks.4.0.ghost1.cheap_operation.1.weight", "blocks.4.0.ghost1.cheap_operation.1.bias", "blocks.4.0.ghost1.cheap_operation.1.running_mean", "blocks.4.0.ghost1.cheap_operation.1.running_var", "blocks.4.0.ghost2.fusion_bn.0.weight", "blocks.4.0.ghost2.fusion_bn.0.bias", "blocks.4.0.ghost2.fusion_bn.0.running_mean", "blocks.4.0.ghost2.fusion_bn.0.running_var", "blocks.4.0.ghost2.cheap_operation.0.weight", "blocks.4.0.ghost2.cheap_operation.1.weight", "blocks.4.0.ghost2.cheap_operation.1.bias", "blocks.4.0.ghost2.cheap_operation.1.running_mean", "blocks.4.0.ghost2.cheap_operation.1.running_var", "blocks.5.0.ghost1.fusion_bn.0.weight", "blocks.5.0.ghost1.fusion_bn.0.bias", "blocks.5.0.ghost1.fusion_bn.0.running_mean", "blocks.5.0.ghost1.fusion_bn.0.running_var", "blocks.5.0.ghost1.cheap_operation.0.weight", "blocks.5.0.ghost1.cheap_operation.1.weight", "blocks.5.0.ghost1.cheap_operation.1.bias", "blocks.5.0.ghost1.cheap_operation.1.running_mean", "blocks.5.0.ghost1.cheap_operation.1.running_var", "blocks.5.0.ghost2.fusion_bn.0.weight", "blocks.5.0.ghost2.fusion_bn.0.bias", "blocks.5.0.ghost2.fusion_bn.0.running_mean", "blocks.5.0.ghost2.fusion_bn.0.running_var", "blocks.5.0.ghost2.cheap_operation.0.weight", "blocks.5.0.ghost2.cheap_operation.1.weight", "blocks.5.0.ghost2.cheap_operation.1.bias", "blocks.5.0.ghost2.cheap_operation.1.running_mean", "blocks.5.0.ghost2.cheap_operation.1.running_var", "blocks.6.0.ghost1.fusion_bn.0.weight", "blocks.6.0.ghost1.fusion_bn.0.bias", "blocks.6.0.ghost1.fusion_bn.0.running_mean", "blocks.6.0.ghost1.fusion_bn.0.running_var", "blocks.6.0.ghost1.cheap_operation.0.weight", "blocks.6.0.ghost1.cheap_operation.1.weight", "blocks.6.0.ghost1.cheap_operation.1.bias", "blocks.6.0.ghost1.cheap_operation.1.running_mean", "blocks.6.0.ghost1.cheap_operation.1.running_var", "blocks.6.0.ghost2.fusion_bn.0.weight", "blocks.6.0.ghost2.fusion_bn.0.bias", "blocks.6.0.ghost2.fusion_bn.0.running_mean", "blocks.6.0.ghost2.fusion_bn.0.running_var", "blocks.6.0.ghost2.cheap_operation.0.weight", "blocks.6.0.ghost2.cheap_operation.1.weight", "blocks.6.0.ghost2.cheap_operation.1.bias", "blocks.6.0.ghost2.cheap_operation.1.running_mean", "blocks.6.0.ghost2.cheap_operation.1.running_var", "blocks.6.1.ghost1.fusion_bn.0.weight", "blocks.6.1.ghost1.fusion_bn.0.bias", "blocks.6.1.ghost1.fusion_bn.0.running_mean", "blocks.6.1.ghost1.fusion_bn.0.running_var", "blocks.6.1.ghost1.cheap_operation.0.weight", "blocks.6.1.ghost1.cheap_operation.1.weight", "blocks.6.1.ghost1.cheap_operation.1.bias", "blocks.6.1.ghost1.cheap_operation.1.running_mean", "blocks.6.1.ghost1.cheap_operation.1.running_var", "blocks.6.1.ghost2.fusion_bn.0.weight", "blocks.6.1.ghost2.fusion_bn.0.bias", "blocks.6.1.ghost2.fusion_bn.0.running_mean", "blocks.6.1.ghost2.fusion_bn.0.running_var", "blocks.6.1.ghost2.cheap_operation.0.weight", "blocks.6.1.ghost2.cheap_operation.1.weight", "blocks.6.1.ghost2.cheap_operation.1.bias", "blocks.6.1.ghost2.cheap_operation.1.running_mean", "blocks.6.1.ghost2.cheap_operation.1.running_var", "blocks.6.2.ghost1.fusion_bn.0.weight", "blocks.6.2.ghost1.fusion_bn.0.bias", "blocks.6.2.ghost1.fusion_bn.0.running_mean", "blocks.6.2.ghost1.fusion_bn.0.running_var", "blocks.6.2.ghost1.cheap_operation.0.weight", "blocks.6.2.ghost1.cheap_operation.1.weight", "blocks.6.2.ghost1.cheap_operation.1.bias", "blocks.6.2.ghost1.cheap_operation.1.running_mean", "blocks.6.2.ghost1.cheap_operation.1.running_var", "blocks.6.2.ghost2.fusion_bn.0.weight", "blocks.6.2.ghost2.fusion_bn.0.bias", "blocks.6.2.ghost2.fusion_bn.0.running_mean", "blocks.6.2.ghost2.fusion_bn.0.running_var", "blocks.6.2.ghost2.cheap_operation.0.weight", "blocks.6.2.ghost2.cheap_operation.1.weight", "blocks.6.2.ghost2.cheap_operation.1.bias", "blocks.6.2.ghost2.cheap_operation.1.running_mean", "blocks.6.2.ghost2.cheap_operation.1.running_var", "blocks.6.3.ghost1.fusion_bn.0.weight", "blocks.6.3.ghost1.fusion_bn.0.bias", "blocks.6.3.ghost1.fusion_bn.0.running_mean", "blocks.6.3.ghost1.fusion_bn.0.running_var", "blocks.6.3.ghost1.cheap_operation.0.weight", "blocks.6.3.ghost1.cheap_operation.1.weight", "blocks.6.3.ghost1.cheap_operation.1.bias", "blocks.6.3.ghost1.cheap_operation.1.running_mean", "blocks.6.3.ghost1.cheap_operation.1.running_var", "blocks.6.3.ghost2.fusion_bn.0.weight", "blocks.6.3.ghost2.fusion_bn.0.bias", "blocks.6.3.ghost2.fusion_bn.0.running_mean", "blocks.6.3.ghost2.fusion_bn.0.running_var", "blocks.6.3.ghost2.cheap_operation.0.weight", "blocks.6.3.ghost2.cheap_operation.1.weight", "blocks.6.3.ghost2.cheap_operation.1.bias", "blocks.6.3.ghost2.cheap_operation.1.running_mean", "blocks.6.3.ghost2.cheap_operation.1.running_var", "blocks.6.4.ghost1.fusion_bn.0.weight", "blocks.6.4.ghost1.fusion_bn.0.bias", "blocks.6.4.ghost1.fusion_bn.0.running_mean", "blocks.6.4.ghost1.fusion_bn.0.running_var", "blocks.6.4.ghost1.cheap_operation.0.weight", "blocks.6.4.ghost1.cheap_operation.1.weight", "blocks.6.4.ghost1.cheap_operation.1.bias", "blocks.6.4.ghost1.cheap_operation.1.running_mean", "blocks.6.4.ghost1.cheap_operation.1.running_var", "blocks.6.4.ghost2.fusion_bn.0.weight", "blocks.6.4.ghost2.fusion_bn.0.bias", "blocks.6.4.ghost2.fusion_bn.0.running_mean", "blocks.6.4.ghost2.fusion_bn.0.running_var", "blocks.6.4.ghost2.cheap_operation.0.weight", "blocks.6.4.ghost2.cheap_operation.1.weight", "blocks.6.4.ghost2.cheap_operation.1.bias", "blocks.6.4.ghost2.cheap_operation.1.running_mean", "blocks.6.4.ghost2.cheap_operation.1.running_var", "blocks.7.0.ghost1.fusion_bn.0.weight", "blocks.7.0.ghost1.fusion_bn.0.bias", "blocks.7.0.ghost1.fusion_bn.0.running_mean", "blocks.7.0.ghost1.fusion_bn.0.running_var", "blocks.7.0.ghost1.cheap_operation.0.weight", "blocks.7.0.ghost1.cheap_operation.1.weight", "blocks.7.0.ghost1.cheap_operation.1.bias", "blocks.7.0.ghost1.cheap_operation.1.running_mean", "blocks.7.0.ghost1.cheap_operation.1.running_var", "blocks.7.0.ghost2.fusion_bn.0.weight", "blocks.7.0.ghost2.fusion_bn.0.bias", "blocks.7.0.ghost2.fusion_bn.0.running_mean", "blocks.7.0.ghost2.fusion_bn.0.running_var", "blocks.7.0.ghost2.cheap_operation.0.weight", "blocks.7.0.ghost2.cheap_operation.1.weight", "blocks.7.0.ghost2.cheap_operation.1.bias", "blocks.7.0.ghost2.cheap_operation.1.running_mean", "blocks.7.0.ghost2.cheap_operation.1.running_var", "blocks.8.0.ghost1.fusion_bn.0.weight", "blocks.8.0.ghost1.fusion_bn.0.bias", "blocks.8.0.ghost1.fusion_bn.0.running_mean", "blocks.8.0.ghost1.fusion_bn.0.running_var", "blocks.8.0.ghost1.cheap_operation.0.weight", "blocks.8.0.ghost1.cheap_operation.1.weight", "blocks.8.0.ghost1.cheap_operation.1.bias", "blocks.8.0.ghost1.cheap_operation.1.running_mean", "blocks.8.0.ghost1.cheap_operation.1.running_var", "blocks.8.0.ghost2.fusion_bn.0.weight", "blocks.8.0.ghost2.fusion_bn.0.bias", "blocks.8.0.ghost2.fusion_bn.0.running_mean", "blocks.8.0.ghost2.fusion_bn.0.running_var", "blocks.8.0.ghost2.cheap_operation.0.weight", "blocks.8.0.ghost2.cheap_operation.1.weight", "blocks.8.0.ghost2.cheap_operation.1.bias", "blocks.8.0.ghost2.cheap_operation.1.running_mean", "blocks.8.0.ghost2.cheap_operation.1.running_var", "blocks.8.1.ghost1.fusion_bn.0.weight", "blocks.8.1.ghost1.fusion_bn.0.bias", "blocks.8.1.ghost1.fusion_bn.0.running_mean", "blocks.8.1.ghost1.fusion_bn.0.running_var", "blocks.8.1.ghost1.cheap_operation.0.weight", "blocks.8.1.ghost1.cheap_operation.1.weight", "blocks.8.1.ghost1.cheap_operation.1.bias", "blocks.8.1.ghost1.cheap_operation.1.running_mean", "blocks.8.1.ghost1.cheap_operation.1.running_var", "blocks.8.1.ghost2.fusion_bn.0.weight", "blocks.8.1.ghost2.fusion_bn.0.bias", "blocks.8.1.ghost2.fusion_bn.0.running_mean", "blocks.8.1.ghost2.fusion_bn.0.running_var", "blocks.8.1.ghost2.cheap_operation.0.weight", "blocks.8.1.ghost2.cheap_operation.1.weight", "blocks.8.1.ghost2.cheap_operation.1.bias", "blocks.8.1.ghost2.cheap_operation.1.running_mean", "blocks.8.1.ghost2.cheap_operation.1.running_var", "blocks.8.2.ghost1.fusion_bn.0.weight", "blocks.8.2.ghost1.fusion_bn.0.bias", "blocks.8.2.ghost1.fusion_bn.0.running_mean", "blocks.8.2.ghost1.fusion_bn.0.running_var", "blocks.8.2.ghost1.cheap_operation.0.weight", "blocks.8.2.ghost1.cheap_operation.1.weight", "blocks.8.2.ghost1.cheap_operation.1.bias", "blocks.8.2.ghost1.cheap_operation.1.running_mean", "blocks.8.2.ghost1.cheap_operation.1.running_var", "blocks.8.2.ghost2.fusion_bn.0.weight", "blocks.8.2.ghost2.fusion_bn.0.bias", "blocks.8.2.ghost2.fusion_bn.0.running_mean", "blocks.8.2.ghost2.fusion_bn.0.running_var", "blocks.8.2.ghost2.cheap_operation.0.weight", "blocks.8.2.ghost2.cheap_operation.1.weight", "blocks.8.2.ghost2.cheap_operation.1.bias", "blocks.8.2.ghost2.cheap_operation.1.running_mean", "blocks.8.2.ghost2.cheap_operation.1.running_var", "blocks.8.3.ghost1.fusion_bn.0.weight", "blocks.8.3.ghost1.fusion_bn.0.bias", "blocks.8.3.ghost1.fusion_bn.0.running_mean", "blocks.8.3.ghost1.fusion_bn.0.running_var", "blocks.8.3.ghost1.cheap_operation.0.weight", "blocks.8.3.ghost1.cheap_operation.1.weight", "blocks.8.3.ghost1.cheap_operation.1.bias", "blocks.8.3.ghost1.cheap_operation.1.running_mean", "blocks.8.3.ghost1.cheap_operation.1.running_var", "blocks.8.3.ghost2.fusion_bn.0.weight", "blocks.8.3.ghost2.fusion_bn.0.bias", "blocks.8.3.ghost2.fusion_bn.0.running_mean", "blocks.8.3.ghost2.fusion_bn.0.running_var", "blocks.8.3.ghost2.cheap_operation.0.weight", "blocks.8.3.ghost2.cheap_operation.1.weight", "blocks.8.3.ghost2.cheap_operation.1.bias", "blocks.8.3.ghost2.cheap_operation.1.running_mean", "blocks.8.3.ghost2.cheap_operation.1.running_var".
        Unexpected key(s) in state_dict: "blocks.0.0.ghost1.cheap_operation.weight", "blocks.0.0.ghost1.cheap_operation.bias", "blocks.0.0.ghost2.cheap_operation.weight", "blocks.0.0.ghost2.cheap_operation.bias", "blocks.1.0.ghost1.cheap_operation.weight", "blocks.1.0.ghost1.cheap_operation.bias", "blocks.1.0.ghost2.cheap_operation.weight", "blocks.1.0.ghost2.cheap_operation.bias", "blocks.2.0.ghost1.cheap_operation.weight", "blocks.2.0.ghost1.cheap_operation.bias", "blocks.2.0.ghost2.cheap_operation.weight", "blocks.2.0.ghost2.cheap_operation.bias", "blocks.3.0.ghost1.cheap_operation.weight", "blocks.3.0.ghost1.cheap_operation.bias", "blocks.3.0.ghost2.cheap_operation.weight", "blocks.3.0.ghost2.cheap_operation.bias", "blocks.4.0.ghost1.cheap_operation.weight", "blocks.4.0.ghost1.cheap_operation.bias", "blocks.4.0.ghost2.cheap_operation.weight", "blocks.4.0.ghost2.cheap_operation.bias", "blocks.5.0.ghost1.cheap_operation.weight", "blocks.5.0.ghost1.cheap_operation.bias", "blocks.5.0.ghost2.cheap_operation.weight", "blocks.5.0.ghost2.cheap_operation.bias", "blocks.6.0.ghost1.cheap_operation.weight", "blocks.6.0.ghost1.cheap_operation.bias", "blocks.6.0.ghost2.cheap_operation.weight", "blocks.6.0.ghost2.cheap_operation.bias", "blocks.6.1.ghost1.cheap_operation.weight", "blocks.6.1.ghost1.cheap_operation.bias", "blocks.6.1.ghost2.cheap_operation.weight", "blocks.6.1.ghost2.cheap_operation.bias", "blocks.6.2.ghost1.cheap_operation.weight", "blocks.6.2.ghost1.cheap_operation.bias", "blocks.6.2.ghost2.cheap_operation.weight", "blocks.6.2.ghost2.cheap_operation.bias", "blocks.6.3.ghost1.cheap_operation.weight", "blocks.6.3.ghost1.cheap_operation.bias", "blocks.6.3.ghost2.cheap_operation.weight", "blocks.6.3.ghost2.cheap_operation.bias", "blocks.6.4.ghost1.cheap_operation.weight", "blocks.6.4.ghost1.cheap_operation.bias", "blocks.6.4.ghost2.cheap_operation.weight", "blocks.6.4.ghost2.cheap_operation.bias", "blocks.7.0.ghost1.cheap_operation.weight", "blocks.7.0.ghost1.cheap_operation.bias", "blocks.7.0.ghost2.cheap_operation.weight", "blocks.7.0.ghost2.cheap_operation.bias", "blocks.8.0.ghost1.cheap_operation.weight", "blocks.8.0.ghost1.cheap_operation.bias", "blocks.8.0.ghost2.cheap_operation.weight", "blocks.8.0.ghost2.cheap_operation.bias", "blocks.8.1.ghost1.cheap_operation.weight", "blocks.8.1.ghost1.cheap_operation.bias", "blocks.8.1.ghost2.cheap_operation.weight", "blocks.8.1.ghost2.cheap_operation.bias", "blocks.8.2.ghost1.cheap_operation.weight", "blocks.8.2.ghost1.cheap_operation.bias", "blocks.8.2.ghost2.cheap_operation.weight", "blocks.8.2.ghost2.cheap_operation.bias", "blocks.8.3.ghost1.cheap_operation.weight", "blocks.8.3.ghost1.cheap_operation.bias", "blocks.8.3.ghost2.cheap_operation.weight", "blocks.8.3.ghost2.cheap_operation.bias".
ChengpengChen commented 1 year ago

Hi, I seems that the provided model weights are not matched to the model.

The convert.py script is to convert models before re-param to fast ones after re-param, that is, the input to convert.py should be weights of a model before re-param, for example

python convert.py model_weights_before_reparam.pkl model_weights_after_reparam.pkl -m repghost.repghostnet

Choneke commented 1 year ago

Thank you for your reply, I tried the above command, it load the model but it raise an error:

python convert.py repghost1_trained.pkl repghost1_converted.pkl -m repghost.repghostnet
=> loading checkpoint 'repghost1_trained.pkl'
Traceback (most recent call last):
  File "convert.py", line 60, in <module>
    convert()
  File "convert.py", line 38, in convert
    checkpoint = checkpoint['state_dict']
KeyError: 'state_dict'
ChengpengChen commented 1 year ago

The model pkl you provided contains only pure model weights, but our script is set default for pkl files containing more infos, e.g., optimizer, state_dict, epochs, and etc. Thus, you can directly use the weights after the loading.

To solve you problem: checkpoint = checkpoint['state_dict'] if 'state_dict' in checkpoint else checkpoint

Choneke commented 1 year ago

Thank you @ChengpengChen the problem has been solved using your suggested solution. One more question, does this not affecting the inference time? As I can see there is no any changes (in inference time) between original model and the converted model. There is a change in size (MB) only.

ChengpengChen commented 1 year ago

This conversion simplifies the network topology, which should provides more inference efficiency. For example, https://github.com/ChengpengChen/RepGhost/issues/6 shows 13.3% speedup of an U-Net using our module in snapdragon 8 gen 1.

In order to analyze the problem, you can provide more details of the models before and after re-param and inference settings.