Skip to content

Commit

Permalink
Refactor code for speed and clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
glenn-jocher committed Jan 15, 2025
1 parent 630da13 commit b5d56c3
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 9 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/format.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Ultralytics 🚀 - AGPL-3.0 License https://ultralytics.com/license
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license

# Ultralytics Actions https://github.com/ultralytics/actions
# This workflow automatically formats code and documentation in PRs to official Ultralytics standards

Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Ultralytics YOLO 🚀, AGPL-3.0 license
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license

# Publish pip package to PyPI https://pypi.org/project/ultralytics-thop/

name: Publish to PyPI
Expand Down
3 changes: 1 addition & 2 deletions benchmark/evaluate_famous_models.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license

import torch
from torchvision import models

from thop.profile import profile
from torchvision import models

model_names = sorted(
name
Expand Down
1 change: 0 additions & 1 deletion benchmark/evaluate_rnn_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import torch
import torch.nn as nn

from thop.profile import profile

input_size = 160
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Ultralytics YOLO 🚀, AGPL-3.0 license
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license

# Publish pip package to PyPI https://pypi.org/project/ultralytics/ and Docs to https://docs.ultralytics.com
#
# Overview:
Expand Down
1 change: 0 additions & 1 deletion tests/test_conv2d.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import torch
import torch.nn as nn

from thop import profile


Expand Down
1 change: 0 additions & 1 deletion tests/test_matmul.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import torch
import torch.nn as nn

from thop import profile


Expand Down
1 change: 0 additions & 1 deletion tests/test_relu.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import torch
import torch.nn as nn

from thop import profile


Expand Down

0 comments on commit b5d56c3

Please sign in to comment.