-
-
Notifications
You must be signed in to change notification settings - Fork 15.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
notebook_init()
to utils/__init__.py (#5488)
* Update __init__.py * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * notebook_init * notebook_init * notebook_init * notebook_init * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * notebook_init * Created using Colaboratory * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
- Loading branch information
1 parent
7207fe9
commit 7ebb5e5
Showing
3 changed files
with
35 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# YOLOv5 🚀 by Ultralytics, GPL-3.0 license | ||
""" | ||
utils/initialization | ||
""" | ||
|
||
|
||
def notebook_init(): | ||
# For YOLOv5 notebooks | ||
print('Checking setup...') | ||
from IPython import display # to display images and clear console output | ||
|
||
from utils.general import emojis | ||
from utils.torch_utils import select_device # YOLOv5 imports | ||
|
||
display.clear_output() | ||
select_device(newline=False) | ||
print(emojis('Setup complete ✅')) | ||
return display |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters