homa 0.0.1__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.
- homa/__init__.py +2 -0
- homa/device.py +25 -0
- homa/settings.py +12 -0
- homa-0.0.1.dist-info/METADATA +12 -0
- homa-0.0.1.dist-info/RECORD +7 -0
- homa-0.0.1.dist-info/WHEEL +5 -0
- homa-0.0.1.dist-info/top_level.txt +1 -0
homa/__init__.py
ADDED
homa/device.py
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import torch
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def get_device():
|
|
5
|
+
if torch.backends.mps.is_available():
|
|
6
|
+
return mps()
|
|
7
|
+
if torch.cuda.is_available():
|
|
8
|
+
return cuda()
|
|
9
|
+
return cpu()
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def cpu():
|
|
13
|
+
return torch.device("cpu")
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def cuda():
|
|
17
|
+
return torch.device("cuda")
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def mps():
|
|
21
|
+
return torch.device("mps")
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def device():
|
|
25
|
+
return get_device()
|
homa/settings.py
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: homa
|
|
3
|
+
Version: 0.0.1
|
|
4
|
+
Summary: A curated list of machine learning and deep learning helpers.
|
|
5
|
+
Author-email: Taha Shieenavaz <tahashieenavaz@gmail.com>
|
|
6
|
+
Requires-Python: >=3.7
|
|
7
|
+
Description-Content-Type: text/markdown
|
|
8
|
+
Requires-Dist: numpy
|
|
9
|
+
Requires-Dist: torch
|
|
10
|
+
|
|
11
|
+
# homa
|
|
12
|
+
A curated collection of machine learning and deep learning helper functions.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
homa/__init__.py,sha256=NBYFKizG8UASiz5HLsEBqzXNGlWr78xm4sLr5hxKvjU,46
|
|
2
|
+
homa/device.py,sha256=9kKXfpYfnEk2cFQWPfcJrVloHgC_SSbP4I8IRY9TYk4,343
|
|
3
|
+
homa/settings.py,sha256=CPZDPvs1380O7SY7FcSKol8kBVFVVYFgSJl3YEyJuZ0,263
|
|
4
|
+
homa-0.0.1.dist-info/METADATA,sha256=TMXUMO31Dt-5DrlD4maXJTNtWYlzMBFJvg3JONUhXj4,366
|
|
5
|
+
homa-0.0.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
6
|
+
homa-0.0.1.dist-info/top_level.txt,sha256=tmOfy2tuaAwc3W5-i6j61_vYJsXgR4ivBWkhJ3ZtJDc,5
|
|
7
|
+
homa-0.0.1.dist-info/RECORD,,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
homa
|