netlite 0.0.7__tar.gz → 0.0.8__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.
Files changed (24) hide show
  1. {netlite-0.0.7 → netlite-0.0.8}/PKG-INFO +1 -1
  2. {netlite-0.0.7 → netlite-0.0.8}/pyproject.toml +1 -1
  3. {netlite-0.0.7 → netlite-0.0.8}/src/netlite/neural_network.py +5 -2
  4. {netlite-0.0.7 → netlite-0.0.8}/.gitignore +0 -0
  5. {netlite-0.0.7 → netlite-0.0.8}/LICENSE +0 -0
  6. {netlite-0.0.7 → netlite-0.0.8}/README.md +0 -0
  7. {netlite-0.0.7 → netlite-0.0.8}/examples/netlite_example_fit_regression_line.py +0 -0
  8. {netlite-0.0.7 → netlite-0.0.8}/examples/netlite_example_lenet_cifar10.py +0 -0
  9. {netlite-0.0.7 → netlite-0.0.8}/examples/netlite_example_lenet_mnist.py +0 -0
  10. {netlite-0.0.7 → netlite-0.0.8}/examples/netlite_example_xor_classifier.py +0 -0
  11. {netlite-0.0.7 → netlite-0.0.8}/images/lenet_mnist_acc_curves.svg +0 -0
  12. {netlite-0.0.7 → netlite-0.0.8}/images/logo_netlite.png +0 -0
  13. {netlite-0.0.7 → netlite-0.0.8}/package_build.sh +0 -0
  14. {netlite-0.0.7 → netlite-0.0.8}/package_upload.sh +0 -0
  15. {netlite-0.0.7 → netlite-0.0.8}/requirements.txt +0 -0
  16. {netlite-0.0.7 → netlite-0.0.8}/src/netlite/__init__.py +0 -0
  17. {netlite-0.0.7 → netlite-0.0.8}/src/netlite/dataloader_cifar10.py +0 -0
  18. {netlite-0.0.7 → netlite-0.0.8}/src/netlite/dataloader_mnist.py +0 -0
  19. {netlite-0.0.7 → netlite-0.0.8}/src/netlite/layers.py +0 -0
  20. {netlite-0.0.7 → netlite-0.0.8}/src/netlite/loss_functions.py +0 -0
  21. {netlite-0.0.7 → netlite-0.0.8}/src/netlite/numba_optional.py +0 -0
  22. {netlite-0.0.7 → netlite-0.0.8}/src/netlite/optimizer.py +0 -0
  23. {netlite-0.0.7 → netlite-0.0.8}/tests/netlite_test.py +0 -0
  24. {netlite-0.0.7 → netlite-0.0.8}/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.7
3
+ Version: 0.0.8
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
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "netlite"
7
- version = "0.0.7"
7
+ version = "0.0.8"
8
8
  authors = [
9
9
  { name="Hanno Homann", email="hanno.homann@example.com" },
10
10
  ]
@@ -1,8 +1,11 @@
1
1
  import numpy as np
2
2
 
3
3
  class NeuralNetwork():
4
- def __init__(self, layers = []):
5
- self.layers = layers
4
+ def __init__(self, layers = None):
5
+ if layers is None:
6
+ self.layers = [] # don't use a new list [] in the default argument, it would be shared by all instances
7
+ else:
8
+ self.layers = layers
6
9
 
7
10
  def add_layer(self, layer):
8
11
  self.layers.append(layer)
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