lucid-dl 2.7.7__tar.gz → 2.7.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 (132) hide show
  1. {lucid_dl-2.7.7/lucid_dl.egg-info → lucid_dl-2.7.8}/PKG-INFO +7 -1
  2. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/README.md +6 -0
  3. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/_tensor/tensor.py +21 -16
  4. {lucid_dl-2.7.7 → lucid_dl-2.7.8/lucid_dl.egg-info}/PKG-INFO +7 -1
  5. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/setup.py +1 -1
  6. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/LICENSE +0 -0
  7. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/__init__.py +0 -0
  8. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/_backend/__init__.py +0 -0
  9. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/_backend/core.py +0 -0
  10. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/_backend/metal.py +0 -0
  11. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/_func/__init__.py +0 -0
  12. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/_func/bfunc.py +0 -0
  13. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/_func/gfunc.py +0 -0
  14. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/_func/ufunc.py +0 -0
  15. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/_tensor/__init__.py +0 -0
  16. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/_tensor/tensor_ops.py +0 -0
  17. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/_util/__init__.py +0 -0
  18. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/_util/func.py +0 -0
  19. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/data/__init__.py +0 -0
  20. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/data/_base.py +0 -0
  21. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/data/_util.py +0 -0
  22. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/datasets/__init__.py +0 -0
  23. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/datasets/_base.py +0 -0
  24. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/datasets/cifar.py +0 -0
  25. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/datasets/mnist.py +0 -0
  26. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/einops/__init__.py +0 -0
  27. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/einops/_func.py +0 -0
  28. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/error.py +0 -0
  29. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/linalg/__init__.py +0 -0
  30. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/linalg/_func.py +0 -0
  31. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/models/__init__.py +0 -0
  32. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/models/imgclf/__init__.py +0 -0
  33. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/models/imgclf/alex.py +0 -0
  34. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/models/imgclf/coatnet.py +0 -0
  35. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/models/imgclf/convnext.py +0 -0
  36. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/models/imgclf/crossvit.py +0 -0
  37. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/models/imgclf/cspnet.py +0 -0
  38. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/models/imgclf/cvt.py +0 -0
  39. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/models/imgclf/dense.py +0 -0
  40. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/models/imgclf/efficient.py +0 -0
  41. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/models/imgclf/efficientformer.py +0 -0
  42. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/models/imgclf/inception.py +0 -0
  43. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/models/imgclf/inception_next.py +0 -0
  44. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/models/imgclf/inception_res.py +0 -0
  45. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/models/imgclf/lenet.py +0 -0
  46. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/models/imgclf/maxvit.py +0 -0
  47. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/models/imgclf/mobile.py +0 -0
  48. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/models/imgclf/pvt.py +0 -0
  49. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/models/imgclf/resnest.py +0 -0
  50. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/models/imgclf/resnet.py +0 -0
  51. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/models/imgclf/resnext.py +0 -0
  52. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/models/imgclf/senet.py +0 -0
  53. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/models/imgclf/sknet.py +0 -0
  54. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/models/imgclf/swin.py +0 -0
  55. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/models/imgclf/vgg.py +0 -0
  56. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/models/imgclf/vit.py +0 -0
  57. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/models/imgclf/xception.py +0 -0
  58. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/models/imgclf/zfnet.py +0 -0
  59. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/models/imggen/__init__.py +0 -0
  60. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/models/imggen/ddpm.py +0 -0
  61. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/models/imggen/vae.py +0 -0
  62. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/models/objdet/__init__.py +0 -0
  63. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/models/objdet/detr.py +0 -0
  64. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/models/objdet/efficientdet.py +0 -0
  65. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/models/objdet/fast_rcnn.py +0 -0
  66. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/models/objdet/faster_rcnn.py +0 -0
  67. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/models/objdet/rcnn.py +0 -0
  68. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/models/objdet/util.py +0 -0
  69. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/models/objdet/yolo/__init__.py +0 -0
  70. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/models/objdet/yolo/yolo_v1.py +0 -0
  71. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/models/objdet/yolo/yolo_v2.py +0 -0
  72. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/models/objdet/yolo/yolo_v3.py +0 -0
  73. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/models/objdet/yolo/yolo_v4.py +0 -0
  74. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/models/seq2seq/__init__.py +0 -0
  75. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/models/seq2seq/transformer.py +0 -0
  76. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/models/util.py +0 -0
  77. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/nn/__init__.py +0 -0
  78. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/nn/functional/__init__.py +0 -0
  79. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/nn/functional/_activation.py +0 -0
  80. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/nn/functional/_attention.py +0 -0
  81. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/nn/functional/_conv.py +0 -0
  82. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/nn/functional/_drop.py +0 -0
  83. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/nn/functional/_linear.py +0 -0
  84. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/nn/functional/_loss.py +0 -0
  85. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/nn/functional/_norm.py +0 -0
  86. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/nn/functional/_pool.py +0 -0
  87. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/nn/functional/_spatial.py +0 -0
  88. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/nn/functional/_util.py +0 -0
  89. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/nn/fused.py +0 -0
  90. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/nn/init/__init__.py +0 -0
  91. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/nn/init/_dist.py +0 -0
  92. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/nn/module.py +0 -0
  93. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/nn/modules/__init__.py +0 -0
  94. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/nn/modules/activation.py +0 -0
  95. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/nn/modules/attention.py +0 -0
  96. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/nn/modules/conv.py +0 -0
  97. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/nn/modules/drop.py +0 -0
  98. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/nn/modules/einops.py +0 -0
  99. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/nn/modules/linear.py +0 -0
  100. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/nn/modules/loss.py +0 -0
  101. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/nn/modules/norm.py +0 -0
  102. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/nn/modules/pool.py +0 -0
  103. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/nn/modules/sparse.py +0 -0
  104. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/nn/modules/transformer.py +0 -0
  105. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/nn/modules/vision.py +0 -0
  106. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/nn/parameter.py +0 -0
  107. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/nn/util.py +0 -0
  108. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/optim/__init__.py +0 -0
  109. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/optim/_base.py +0 -0
  110. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/optim/ada.py +0 -0
  111. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/optim/adam.py +0 -0
  112. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/optim/lr_scheduler/__init__.py +0 -0
  113. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/optim/lr_scheduler/_base.py +0 -0
  114. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/optim/lr_scheduler/_schedulers.py +0 -0
  115. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/optim/prop.py +0 -0
  116. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/optim/sgd.py +0 -0
  117. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/port.py +0 -0
  118. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/random/__init__.py +0 -0
  119. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/random/_func.py +0 -0
  120. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/transforms/__init__.py +0 -0
  121. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/transforms/_base.py +0 -0
  122. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/transforms/image.py +0 -0
  123. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/types.py +0 -0
  124. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/visual/__init__.py +0 -0
  125. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/visual/graph.py +0 -0
  126. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/weights/__init__.py +0 -0
  127. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid/weights/__init__.pyi +0 -0
  128. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid_dl.egg-info/SOURCES.txt +0 -0
  129. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid_dl.egg-info/dependency_links.txt +0 -0
  130. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid_dl.egg-info/requires.txt +0 -0
  131. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/lucid_dl.egg-info/top_level.txt +0 -0
  132. {lucid_dl-2.7.7 → lucid_dl-2.7.8}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lucid-dl
3
- Version: 2.7.7
3
+ Version: 2.7.8
4
4
  Summary: Lumerico's Comprehensive Interface for Deep Learning
5
5
  Home-page: https://github.com/ChanLumerico/lucid
6
6
  Author: ChanLumerico
@@ -46,6 +46,12 @@ Whether you're a student, educator, or an advanced researcher seeking to demysti
46
46
 
47
47
  - Now supports [**`Safetensors`**](https://github.com/huggingface/safetensors) for Lucid neural module porting along with the legacy `.lcd` format
48
48
 
49
+ - Added multiple `nn` utilities:
50
+
51
+ - `nn.util.grad_norm` - Returns the global norm of the gradients
52
+ - `nn.util.clip_grad_norm` - Rescales the gradients based on the global norm
53
+ - `nn.util.clip_grad_value` - Rescales the gradients based on their values.
54
+
49
55
  - Implemented **EfficientDet**: `lucid.models.EfficientDet` with variants from `D0` to `D7`
50
56
 
51
57
  ## 🔧 How to Install
@@ -18,6 +18,12 @@ Whether you're a student, educator, or an advanced researcher seeking to demysti
18
18
 
19
19
  - Now supports [**`Safetensors`**](https://github.com/huggingface/safetensors) for Lucid neural module porting along with the legacy `.lcd` format
20
20
 
21
+ - Added multiple `nn` utilities:
22
+
23
+ - `nn.util.grad_norm` - Returns the global norm of the gradients
24
+ - `nn.util.clip_grad_norm` - Rescales the gradients based on the global norm
25
+ - `nn.util.clip_grad_value` - Rescales the gradients based on their values.
26
+
21
27
  - Implemented **EfficientDet**: `lucid.models.EfficientDet` with variants from `D0` to `D7`
22
28
 
23
29
  ## 🔧 How to Install
@@ -397,28 +397,33 @@ class Tensor(_TensorBase):
397
397
  return hash(id(self))
398
398
 
399
399
  def __deepcopy__(self, *args: Any) -> Self:
400
+ cls = self.__class__
400
401
  copied_data = Tensor.copy_data(self.data)
401
402
 
402
- new_tensor = Tensor(
403
- copied_data,
404
- requires_grad=self.requires_grad,
405
- keep_grad=self.keep_grad,
406
- dtype=self.dtype,
407
- device=self.device,
408
- )
403
+ if cls is Tensor:
404
+ new = Tensor(
405
+ copied_data, self.requires_grad, self.keep_grad, self.dtype, self.device
406
+ )
407
+ else:
408
+ base = Tensor(copied_data, dtype=self.dtype, device=self.device)
409
+ new = cls(base)
409
410
 
410
- if self.grad is not None:
411
- new_tensor.grad = Tensor.copy_grad(self.grad)
411
+ if self.grad is not None and (
412
+ self.keep_grad or getattr(new, "keep_grad", False)
413
+ ):
414
+ new.grad = Tensor.copy_grad(self.grad)
415
+ else:
416
+ new.grad = None
412
417
 
413
- new_tensor._op = self._op
414
- new_tensor._backward_op = self._backward_op
415
- new_tensor._prev = self._prev.copy()
416
- new_tensor._backward_hooks = self._backward_hooks.copy()
418
+ new._op = None
419
+ new._backward_op = _noop
420
+ new._prev = []
421
+ new._backward_hooks = []
417
422
 
418
- new_tensor._is_free = self._is_free
419
- new_tensor._is_bool_tensor = self._is_bool_tensor
423
+ new._is_free = self._is_free
424
+ new._is_bool_tensor = self._is_bool_tensor
420
425
 
421
- return new_tensor
426
+ return new
422
427
 
423
428
  def __bool__(self) -> bool:
424
429
  if self.data.size != 1:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lucid-dl
3
- Version: 2.7.7
3
+ Version: 2.7.8
4
4
  Summary: Lumerico's Comprehensive Interface for Deep Learning
5
5
  Home-page: https://github.com/ChanLumerico/lucid
6
6
  Author: ChanLumerico
@@ -46,6 +46,12 @@ Whether you're a student, educator, or an advanced researcher seeking to demysti
46
46
 
47
47
  - Now supports [**`Safetensors`**](https://github.com/huggingface/safetensors) for Lucid neural module porting along with the legacy `.lcd` format
48
48
 
49
+ - Added multiple `nn` utilities:
50
+
51
+ - `nn.util.grad_norm` - Returns the global norm of the gradients
52
+ - `nn.util.clip_grad_norm` - Rescales the gradients based on the global norm
53
+ - `nn.util.clip_grad_value` - Rescales the gradients based on their values.
54
+
49
55
  - Implemented **EfficientDet**: `lucid.models.EfficientDet` with variants from `D0` to `D7`
50
56
 
51
57
  ## 🔧 How to Install
@@ -5,7 +5,7 @@ with open("README.md", "r") as fh:
5
5
 
6
6
  setuptools.setup(
7
7
  name="lucid-dl",
8
- version="2.7.7",
8
+ version="2.7.8",
9
9
  author="ChanLumerico",
10
10
  author_email="greensox284@gmail.com",
11
11
  description="Lumerico's Comprehensive Interface for Deep Learning",
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
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes