lucid-dl 2.8.4__py3-none-any.whl → 2.8.5__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.
lucid/linalg/_func.py CHANGED
@@ -142,7 +142,6 @@ class cholesky(operation):
142
142
  return int((1 / 3) * a.shape[-1] ** 3)
143
143
 
144
144
 
145
- @fallback
146
145
  class norm(operation):
147
146
  def __init__(
148
147
  self,
@@ -168,20 +167,10 @@ class norm(operation):
168
167
 
169
168
  @unary_func_op(device="gpu")
170
169
  def gpu(self, a: Tensor) -> _FuncOpReturnType:
171
- fallback_ = self.axis is None or (
172
- isinstance(self.axis, (tuple, list)) and a.ndim > 1
170
+ mx_ord = self.ord if not (self.ord == 2 and a.ndim > 2) else None
171
+ self.result = Tensor(
172
+ mx.linalg.norm(a.data, ord=mx_ord, axis=self.axis, keepdims=self.keepdims)
173
173
  )
174
- if fallback_:
175
- result_data = np.linalg.norm(
176
- a.data, ord=self.ord, axis=self.axis, keepdims=self.keepdims
177
- )
178
- self.result = Tensor(result_data, device="gpu")
179
- else:
180
- result_data = mx.linalg.norm(
181
- a.data, ord=self.ord, axis=self.axis, keepdims=self.keepdims
182
- )
183
- self.result = Tensor(result_data)
184
-
185
174
  return self.result, partial(self.__grad__, a=a, lib_=mx)
186
175
 
187
176
  def __grad__(self, a: Tensor, lib_: ModuleType) -> _GradFuncType:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lucid-dl
3
- Version: 2.8.4
3
+ Version: 2.8.5
4
4
  Summary: Lumerico's Comprehensive Interface for Deep Learning
5
5
  Home-page: https://github.com/ChanLumerico/lucid
6
6
  Author: ChanLumerico
@@ -33,15 +33,19 @@ Dynamic: summary
33
33
  ![PyPI - Total Downloads](https://img.shields.io/badge/total%20downloads-34.0k-yellow.svg)
34
34
  ![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/ChanLumerico/lucid.svg)
35
35
  ![Code Style](https://img.shields.io/badge/code%20style-black-000000.svg)
36
- ![Lines of Code](https://img.shields.io/badge/lines%20of%20code-26.5k-purple.svg)
36
+ ![Lines of Code](https://img.shields.io/badge/lines%20of%20code-26.9k-purple.svg)
37
37
 
38
38
  **Lucid** is a minimalist deep learning framework built entirely from scratch in Python. It offers a pedagogically rich environment to explore the foundations of modern deep learning systems, including autodiff, neural network modules, and GPU acceleration — all while staying lightweight, readable, and free of complex dependencies.
39
39
 
40
40
  Whether you're a student, educator, or an advanced researcher seeking to demystify deep learning internals, Lucid provides a transparent and highly introspectable API that faithfully replicates key behaviors of major frameworks like PyTorch, yet in a form simple enough to study line by line.
41
41
 
42
- [📑 Lucid Documentation](https://chanlumerico.github.io/lucid/build/html/index.html) |
42
+ [📑 Lucid Documentation](https://chanlumerico.github.io/lucid/build/html/index.html) | [✏️ Lucid DevLog](https://velog.io/@lumerico284/series/Lucid-Development) |
43
43
  [🤗 Lucid Huggingface](https://huggingface.co/ChanLumerico/lucid)
44
44
 
45
+ #### Other Languages
46
+
47
+ [🇰🇷 README.md in Korean](https://github.com/ChanLumerico/lucid/blob/main/README.kr.md)
48
+
45
49
  ### 🔥 What's New
46
50
 
47
51
  - Now supports [**`Safetensors`**](https://github.com/huggingface/safetensors) for Lucid neural module porting along with the legacy `.lcd` format
@@ -24,7 +24,7 @@ lucid/datasets/mnist.py,sha256=mLjcp8Jx8987F21J13snH7cdG75qZRSHMuKYXV7QFt4,3739
24
24
  lucid/einops/__init__.py,sha256=9Dlmfw6PsIU9b_a89Zre4yV2rztRHPCL4QpsUnXJwjM,802
25
25
  lucid/einops/_func.py,sha256=h8uMGzgzHEjips6zWPQZ5mMXSTWbjLYCgV5Vb6yi4Io,21046
26
26
  lucid/linalg/__init__.py,sha256=N-LrlC3qSsOMt6Ad1-PP3Qc3QH6EWNf5P50GBvwb9aQ,1118
27
- lucid/linalg/_func.py,sha256=3fd6LRpMilhjFSA4a9hnhlcoeloLZflFcPf2-_CPjR4,16785
27
+ lucid/linalg/_func.py,sha256=69jXRkZYcACROHGKgXchtsIO4TwuDAPh4vxVEdx46OI,16450
28
28
  lucid/models/__init__.py,sha256=wegfOBvwJTFFee8eVt90zJoLsbbEpdT5G2y-mpO5xcE,89
29
29
  lucid/models/util.py,sha256=2g8FLcMLRgVxgGEaYuwJyFxeXu-A_a4_MVr0K-TNh74,5195
30
30
  lucid/models/imgclf/__init__.py,sha256=kQH-nNu8_TPJ7Av151WSpcY4GJ06gGAd6Ozs3m3KMcE,590
@@ -121,8 +121,8 @@ lucid/visual/__init__.py,sha256=6TuFDfmXTwpLyHl7_KqBfdzW6zqHjGzIFvymjFPlvjI,21
121
121
  lucid/visual/graph.py,sha256=YjpIDM_lloZARw3sCBiXPl_hT5A2gTk2fEHvwvJWXTk,4599
122
122
  lucid/weights/__init__.py,sha256=z1AikA3rOEeckWGkYWlcZkxNlJo9Xwa39PL6ly3hWnc,8801
123
123
  lucid/weights/__init__.pyi,sha256=lFonYC3cUx2Idolf3AEPnjFcyqcn3UDU84oJlZafqLY,3013
124
- lucid_dl-2.8.4.dist-info/licenses/LICENSE,sha256=vxRFYnVD1IeYtsvw-KmoElfqrjxKHv1h9YTvsG54loQ,1065
125
- lucid_dl-2.8.4.dist-info/METADATA,sha256=PEJ39ILJW83H4hJU6hTTHhZat3TME8R_BMXtBIZjwZs,11314
126
- lucid_dl-2.8.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
127
- lucid_dl-2.8.4.dist-info/top_level.txt,sha256=uzP_qBx9iNWIHKJRlElYcBLYVqMpdm9Q1Ma63QPYbFc,6
128
- lucid_dl-2.8.4.dist-info/RECORD,,
124
+ lucid_dl-2.8.5.dist-info/licenses/LICENSE,sha256=vxRFYnVD1IeYtsvw-KmoElfqrjxKHv1h9YTvsG54loQ,1065
125
+ lucid_dl-2.8.5.dist-info/METADATA,sha256=fjMF0KOZ4YyC3eSw2BgOCkqIFkTIOYwB3fXN9AGbZ-Q,11510
126
+ lucid_dl-2.8.5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
127
+ lucid_dl-2.8.5.dist-info/top_level.txt,sha256=uzP_qBx9iNWIHKJRlElYcBLYVqMpdm9Q1Ma63QPYbFc,6
128
+ lucid_dl-2.8.5.dist-info/RECORD,,