netlite 0.0.6__tar.gz → 0.0.7__tar.gz
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.
- {netlite-0.0.6 → netlite-0.0.7}/PKG-INFO +1 -1
- {netlite-0.0.6 → netlite-0.0.7}/pyproject.toml +1 -1
- {netlite-0.0.6 → netlite-0.0.7}/src/netlite/layers.py +1 -1
- netlite-0.0.7/src/netlite/numba_optional.py +26 -0
- {netlite-0.0.6 → netlite-0.0.7}/.gitignore +0 -0
- {netlite-0.0.6 → netlite-0.0.7}/LICENSE +0 -0
- {netlite-0.0.6 → netlite-0.0.7}/README.md +0 -0
- {netlite-0.0.6 → netlite-0.0.7}/examples/netlite_example_fit_regression_line.py +0 -0
- {netlite-0.0.6 → netlite-0.0.7}/examples/netlite_example_lenet_cifar10.py +0 -0
- {netlite-0.0.6 → netlite-0.0.7}/examples/netlite_example_lenet_mnist.py +0 -0
- {netlite-0.0.6 → netlite-0.0.7}/examples/netlite_example_xor_classifier.py +0 -0
- {netlite-0.0.6 → netlite-0.0.7}/images/lenet_mnist_acc_curves.svg +0 -0
- {netlite-0.0.6 → netlite-0.0.7}/images/logo_netlite.png +0 -0
- {netlite-0.0.6 → netlite-0.0.7}/package_build.sh +0 -0
- {netlite-0.0.6 → netlite-0.0.7}/package_upload.sh +0 -0
- {netlite-0.0.6 → netlite-0.0.7}/requirements.txt +0 -0
- {netlite-0.0.6 → netlite-0.0.7}/src/netlite/__init__.py +0 -0
- {netlite-0.0.6 → netlite-0.0.7}/src/netlite/dataloader_cifar10.py +0 -0
- {netlite-0.0.6 → netlite-0.0.7}/src/netlite/dataloader_mnist.py +0 -0
- {netlite-0.0.6 → netlite-0.0.7}/src/netlite/loss_functions.py +0 -0
- {netlite-0.0.6 → netlite-0.0.7}/src/netlite/neural_network.py +0 -0
- {netlite-0.0.6 → netlite-0.0.7}/src/netlite/optimizer.py +0 -0
- {netlite-0.0.6 → netlite-0.0.7}/tests/netlite_test.py +0 -0
- {netlite-0.0.6 → netlite-0.0.7}/tests/netlite_test_convolution.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: netlite
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.7
|
|
4
4
|
Summary: A small white-box training framework for neural networks for education.
|
|
5
5
|
Project-URL: Homepage, https://github.com/haho12/netlite
|
|
6
6
|
Project-URL: Issues, https://github.com/haho12/netlite/issues
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Wrapper to make numba optional, as DLL import errors of the LLVM compiler have been observed on windows.
|
|
2
|
+
# When numba is not avaliable, the convolutional layer is slowed down significantly.
|
|
3
|
+
import warnings
|
|
4
|
+
|
|
5
|
+
try:
|
|
6
|
+
import numba
|
|
7
|
+
NUMBA_AVAILABLE = True
|
|
8
|
+
except ImportError as e:
|
|
9
|
+
warnings.warn(f"Numba import error (not installed?): {e}")
|
|
10
|
+
NUMBA_AVAILABLE = False
|
|
11
|
+
except OSError as e:
|
|
12
|
+
warnings.warn(f"Numba import error (missing DLL?): {e}")
|
|
13
|
+
NUMBA_AVAILABLE = False
|
|
14
|
+
|
|
15
|
+
if not NUMBA_AVAILABLE:
|
|
16
|
+
# create fake numba API with no-op decorators
|
|
17
|
+
class _FakeNumba:
|
|
18
|
+
def njit(self, *args, **kwargs):
|
|
19
|
+
def decorator(func):
|
|
20
|
+
return func # return the original function unchanged
|
|
21
|
+
return decorator
|
|
22
|
+
|
|
23
|
+
def prange(self, x):
|
|
24
|
+
return range(x) # prange → normal range
|
|
25
|
+
|
|
26
|
+
numba = _FakeNumba()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|