ultralytics-thop 2.0.5__py3-none-any.whl → 2.0.7__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- thop/__init__.py +2 -1
 - thop/profile.py +2 -2
 - thop/vision/basic_hooks.py +1 -1
 - {ultralytics_thop-2.0.5.dist-info → ultralytics_thop-2.0.7.dist-info}/METADATA +7 -5
 - ultralytics_thop-2.0.7.dist-info/RECORD +13 -0
 - {ultralytics_thop-2.0.5.dist-info → ultralytics_thop-2.0.7.dist-info}/WHEEL +1 -1
 - ultralytics_thop-2.0.5.dist-info/RECORD +0 -13
 - {ultralytics_thop-2.0.5.dist-info → ultralytics_thop-2.0.7.dist-info}/LICENSE +0 -0
 - {ultralytics_thop-2.0.5.dist-info → ultralytics_thop-2.0.7.dist-info}/top_level.txt +0 -0
 
    
        thop/__init__.py
    CHANGED
    
    
    
        thop/profile.py
    CHANGED
    
    | 
         @@ -69,8 +69,8 @@ def profile_origin(model, inputs, custom_ops=None, verbose=True, report_missing= 
     | 
|
| 
       69 
69 
     | 
    
         | 
| 
       70 
70 
     | 
    
         
             
                    if hasattr(m, "total_ops") or hasattr(m, "total_params"):
         
     | 
| 
       71 
71 
     | 
    
         
             
                        logging.warning(
         
     | 
| 
       72 
     | 
    
         
            -
                            "Either .total_ops or .total_params is already defined in  
     | 
| 
       73 
     | 
    
         
            -
                            "Be careful, it might change your code's behavior." 
     | 
| 
      
 72 
     | 
    
         
            +
                            f"Either .total_ops or .total_params is already defined in {str(m)}. "
         
     | 
| 
      
 73 
     | 
    
         
            +
                            "Be careful, it might change your code's behavior."
         
     | 
| 
       74 
74 
     | 
    
         
             
                        )
         
     | 
| 
       75 
75 
     | 
    
         | 
| 
       76 
76 
     | 
    
         
             
                    m.register_buffer("total_ops", torch.zeros(1, dtype=default_dtype))
         
     | 
    
        thop/vision/basic_hooks.py
    CHANGED
    
    | 
         @@ -44,7 +44,7 @@ def count_convNd_ver2(m: _ConvNd, x, y: torch.Tensor): 
     | 
|
| 
       44 
44 
     | 
    
         
             
                x = x[0]
         
     | 
| 
       45 
45 
     | 
    
         | 
| 
       46 
46 
     | 
    
         
             
                # N x H x W (exclude Cout)
         
     | 
| 
       47 
     | 
    
         
            -
                output_size = torch.zeros( 
     | 
| 
      
 47 
     | 
    
         
            +
                output_size = torch.zeros(y.size()[:1] + y.size()[2:]).numel()
         
     | 
| 
       48 
48 
     | 
    
         
             
                # # Cout x Cin x Kw x Kh
         
     | 
| 
       49 
49 
     | 
    
         
             
                # kernel_ops = m.weight.nelement()
         
     | 
| 
       50 
50 
     | 
    
         
             
                # if m.bias is not None:
         
     | 
| 
         @@ -1,13 +1,15 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            Metadata-Version: 2.1
         
     | 
| 
       2 
2 
     | 
    
         
             
            Name: ultralytics-thop
         
     | 
| 
       3 
     | 
    
         
            -
            Version: 2.0. 
     | 
| 
      
 3 
     | 
    
         
            +
            Version: 2.0.7
         
     | 
| 
       4 
4 
     | 
    
         
             
            Summary: Ultralytics THOP package for fast computation of PyTorch model FLOPs and parameters.
         
     | 
| 
       5 
5 
     | 
    
         
             
            Author-email: Ligeng Zhu <ligeng.zhu+github@gmail.com>
         
     | 
| 
       6 
6 
     | 
    
         
             
            Maintainer: Glenn Jocher
         
     | 
| 
       7 
7 
     | 
    
         
             
            License: AGPL-3.0
         
     | 
| 
      
 8 
     | 
    
         
            +
            Project-URL: Homepage, https://ultralytics.com
         
     | 
| 
      
 9 
     | 
    
         
            +
            Project-URL: Source, https://github.com/ultralytics/thop
         
     | 
| 
      
 10 
     | 
    
         
            +
            Project-URL: Documentation, https://docs.ultralytics.com
         
     | 
| 
       8 
11 
     | 
    
         
             
            Project-URL: Bug Reports, https://github.com/ultralytics/thop/issues
         
     | 
| 
       9 
     | 
    
         
            -
            Project-URL:  
     | 
| 
       10 
     | 
    
         
            -
            Project-URL: Source, https://github.com/ultralytics/thop/
         
     | 
| 
      
 12 
     | 
    
         
            +
            Project-URL: Changelog, https://github.com/ultralytics/thop/releases
         
     | 
| 
       11 
13 
     | 
    
         
             
            Keywords: FLOPs,PyTorch,Model Analysis
         
     | 
| 
       12 
14 
     | 
    
         
             
            Classifier: Development Status :: 4 - Beta
         
     | 
| 
       13 
15 
     | 
    
         
             
            Classifier: Intended Audience :: Developers
         
     | 
| 
         @@ -40,7 +42,7 @@ Requires-Dist: torch 
     | 
|
| 
       40 
42 
     | 
    
         | 
| 
       41 
43 
     | 
    
         
             
            Welcome to the [THOP](https://github.com/ultralytics/thop) repository, your comprehensive solution for profiling PyTorch models by computing the number of Multiply-Accumulate Operations (MACs) and parameters. This tool is essential for deep learning practitioners to evaluate model efficiency and performance.
         
     | 
| 
       42 
44 
     | 
    
         | 
| 
       43 
     | 
    
         
            -
            [](https://github.com/ultralytics/thop/actions/workflows/main.yml) <a href="https://ultralytics.com/discord"><img alt="Discord" src="https://img.shields.io/discord/1089800235347353640?logo=discord&logoColor=white&label=Discord&color=blue"></a> <a href="https://community.ultralytics.com"><img alt="Ultralytics Forums" src="https://img.shields.io/discourse/users?server=https%3A%2F%2Fcommunity.ultralytics.com&logo=discourse&label=Forums&color=blue"></a>
         
     | 
| 
      
 45 
     | 
    
         
            +
            [](https://github.com/ultralytics/thop/actions/workflows/main.yml) <a href="https://ultralytics.com/discord"><img alt="Discord" src="https://img.shields.io/discord/1089800235347353640?logo=discord&logoColor=white&label=Discord&color=blue"></a> <a href="https://community.ultralytics.com"><img alt="Ultralytics Forums" src="https://img.shields.io/discourse/users?server=https%3A%2F%2Fcommunity.ultralytics.com&logo=discourse&label=Forums&color=blue"></a> <a href="https://reddit.com/r/ultralytics"><img alt="Ultralytics Reddit" src="https://img.shields.io/reddit/subreddit-subscribers/ultralytics?style=flat&logo=reddit&logoColor=white&label=Reddit&color=blue"></a>
         
     | 
| 
       44 
46 
     | 
    
         | 
| 
       45 
47 
     | 
    
         
             
            ## 📄 Description
         
     | 
| 
       46 
48 
     | 
    
         | 
| 
         @@ -176,7 +178,7 @@ THOP is licensed under the AGPL-3.0 License. For more information, see the [LICE 
     | 
|
| 
       176 
178 
     | 
    
         | 
| 
       177 
179 
     | 
    
         
             
            ## 📮 Contact
         
     | 
| 
       178 
180 
     | 
    
         | 
| 
       179 
     | 
    
         
            -
            For bugs or feature requests, please open an issue on [GitHub Issues](https://github.com/ultralytics/thop/ 
     | 
| 
      
 181 
     | 
    
         
            +
            For bugs or feature requests, please open an issue on [GitHub Issues](https://github.com/ultralytics/thop/pulls). Join our community on [Discord](https://discord.com/invite/ultralytics) for discussions and support.
         
     | 
| 
       180 
182 
     | 
    
         | 
| 
       181 
183 
     | 
    
         
             
            <br>
         
     | 
| 
       182 
184 
     | 
    
         
             
            <div align="center">
         
     | 
| 
         @@ -0,0 +1,13 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            thop/__init__.py,sha256=S2xHfvnUKw43H3eIXFVpfzhKXKurzQVJ5ql-ez5XBLQ,147
         
     | 
| 
      
 2 
     | 
    
         
            +
            thop/fx_profile.py,sha256=u1eNvsRBTl9u0jJ6ymgrnrJP1VSLpAZkaEvm4D2mrI4,8172
         
     | 
| 
      
 3 
     | 
    
         
            +
            thop/profile.py,sha256=xIetT1iovk7t9iLvFajF8FqH2z_anItekOi93oeW9A4,7909
         
     | 
| 
      
 4 
     | 
    
         
            +
            thop/rnn_hooks.py,sha256=IwxLvVvbeo5skThdg3BKXm08_0GsM8FI2QM_alQcCB8,6432
         
     | 
| 
      
 5 
     | 
    
         
            +
            thop/utils.py,sha256=SP5QWanMqVRieDoYGQN-7lftZmYXohn2E_m3cP17tS4,1413
         
     | 
| 
      
 6 
     | 
    
         
            +
            thop/vision/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
         
     | 
| 
      
 7 
     | 
    
         
            +
            thop/vision/basic_hooks.py,sha256=mYMNGI8vfP7OafqBirkt4G_5Wa5upfsTsrWj9Fiu0Ao,4637
         
     | 
| 
      
 8 
     | 
    
         
            +
            thop/vision/calc_func.py,sha256=5YbWp48XRbJYzSRkAFMr5xlM4o5BbjTcU6rHSKPkD6I,4291
         
     | 
| 
      
 9 
     | 
    
         
            +
            ultralytics_thop-2.0.7.dist-info/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
         
     | 
| 
      
 10 
     | 
    
         
            +
            ultralytics_thop-2.0.7.dist-info/METADATA,sha256=EROxsJqaDV_B9FuKaXmx7ePwal1Vbt8Y9cGZ-JhfxNQ,9255
         
     | 
| 
      
 11 
     | 
    
         
            +
            ultralytics_thop-2.0.7.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
         
     | 
| 
      
 12 
     | 
    
         
            +
            ultralytics_thop-2.0.7.dist-info/top_level.txt,sha256=HQ7D0gSvDJ31CNR-f0EuXNVve05RYBmwyIkHQKiEhU8,5
         
     | 
| 
      
 13 
     | 
    
         
            +
            ultralytics_thop-2.0.7.dist-info/RECORD,,
         
     | 
| 
         @@ -1,13 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            thop/__init__.py,sha256=nK70p3-KAE26eX_cPJWO20-Ex7jGo6wQzzNEfVw4fPA,146
         
     | 
| 
       2 
     | 
    
         
            -
            thop/fx_profile.py,sha256=u1eNvsRBTl9u0jJ6ymgrnrJP1VSLpAZkaEvm4D2mrI4,8172
         
     | 
| 
       3 
     | 
    
         
            -
            thop/profile.py,sha256=7ZMuGia9jIz_aeuUWXD_wb5WgunuaPx7nfaUQVf8CzY,7911
         
     | 
| 
       4 
     | 
    
         
            -
            thop/rnn_hooks.py,sha256=IwxLvVvbeo5skThdg3BKXm08_0GsM8FI2QM_alQcCB8,6432
         
     | 
| 
       5 
     | 
    
         
            -
            thop/utils.py,sha256=SP5QWanMqVRieDoYGQN-7lftZmYXohn2E_m3cP17tS4,1413
         
     | 
| 
       6 
     | 
    
         
            -
            thop/vision/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
         
     | 
| 
       7 
     | 
    
         
            -
            thop/vision/basic_hooks.py,sha256=tKclhcddDByXrIXiI9u224nIKTbqWfp2J3hqIUYK6Hc,4639
         
     | 
| 
       8 
     | 
    
         
            -
            thop/vision/calc_func.py,sha256=5YbWp48XRbJYzSRkAFMr5xlM4o5BbjTcU6rHSKPkD6I,4291
         
     | 
| 
       9 
     | 
    
         
            -
            ultralytics_thop-2.0.5.dist-info/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
         
     | 
| 
       10 
     | 
    
         
            -
            ultralytics_thop-2.0.5.dist-info/METADATA,sha256=YpxckraEA6xdewKwG946fJBuay4L7O_gArZvYYNYeA0,8912
         
     | 
| 
       11 
     | 
    
         
            -
            ultralytics_thop-2.0.5.dist-info/WHEEL,sha256=HiCZjzuy6Dw0hdX5R3LCFPDmFS4BWl8H-8W39XfmgX4,91
         
     | 
| 
       12 
     | 
    
         
            -
            ultralytics_thop-2.0.5.dist-info/top_level.txt,sha256=HQ7D0gSvDJ31CNR-f0EuXNVve05RYBmwyIkHQKiEhU8,5
         
     | 
| 
       13 
     | 
    
         
            -
            ultralytics_thop-2.0.5.dist-info/RECORD,,
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     |