lt-tensor 0.0.1.dev1__py3-none-any.whl → 0.0.1.dev3__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.
lt_tensor/__init__.py CHANGED
@@ -1 +1 @@
1
- __version__ = "0.0.1dev1"
1
+ __version__ = "0.0.1dev3"
lt_tensor/misc_utils.py CHANGED
@@ -23,7 +23,7 @@ def log_tensor(
23
23
  _b = 20 + len(title.strip())
24
24
  print(f"shape: {item.shape}")
25
25
  print(f"dtype: {item.dtype}")
26
- if not print_details:
26
+ if print_details:
27
27
  print(f"ndim: {item.ndim}")
28
28
  if isinstance(item, Tensor):
29
29
  print(f"device: {item.device}")
lt_tensor/transform.py CHANGED
@@ -175,7 +175,7 @@ def get_sinusoidal_embedding(timesteps: torch.Tensor, dim: int) -> torch.Tensor:
175
175
  return emb
176
176
 
177
177
 
178
- def generate_window(
178
+ def _generate_window(
179
179
  M: int, alpha: float = 0.5, device: Optional[DeviceType] = None
180
180
  ) -> Tensor:
181
181
  if M < 1:
@@ -260,7 +260,7 @@ def window_sumsquare(
260
260
  x = torch.zeros(total_length, dtype=dtype, device=device)
261
261
 
262
262
  # Get the window (from scipy for now)
263
- win = generate_window(window_spec, win_length, fftbins=True)
263
+ win = _generate_window(window_spec, win_length, fftbins=True)
264
264
  win = torch.tensor(win, dtype=dtype, device=device)
265
265
 
266
266
  # Normalize and square
@@ -277,9 +277,6 @@ def window_sumsquare(
277
277
  return x
278
278
 
279
279
 
280
- def get_window(win_length: int = 1200):
281
- return generate_window(win_length)
282
-
283
280
 
284
281
  def inverse_transform(
285
282
  spec: Tensor,
@@ -288,10 +285,10 @@ def inverse_transform(
288
285
  n_fft: int = 2048,
289
286
  hop_length: int = 300,
290
287
  win_length: int = 1200,
291
- length: Optional[torch.shape] = None,
288
+ length: Optional[Any] = None,
292
289
  ):
293
290
  if window is None:
294
- window = generate_window(win_length)
291
+ window = _generate_window(win_length)
295
292
  return torch.istft(
296
293
  spec * torch.exp(phase * 1j),
297
294
  n_fft,
@@ -313,7 +310,7 @@ def stft_istft_rebuild(
313
310
  Perform STFT followed by ISTFT reconstruction using magnitude and phase.
314
311
  """
315
312
  if window is None:
316
- window = generate_window(win_length)
313
+ window = _generate_window(win_length)
317
314
  st = torch.stft(
318
315
  input_data,
319
316
  n_fft,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lt-tensor
3
- Version: 0.0.1.dev1
3
+ Version: 0.0.1.dev3
4
4
  Summary: General utilities for PyTorch and others. Built for general use.
5
5
  Home-page: https://github.com/gr1336/lt-tensor/
6
6
  Author: gr1336
@@ -1,11 +1,11 @@
1
- lt_tensor/__init__.py,sha256=fHS3r6eTARkZmS9vI1iPgHEL-H8y3z0skMRkAfilD8g,26
1
+ lt_tensor/__init__.py,sha256=pUB05ZkgkpP10ivzwoWdbq_HCxw-iOsbf6m8eFtx-YM,26
2
2
  lt_tensor/_basics.py,sha256=XS2OrvyzboUTKURGMU1fmbn2gFq2779HW8xz05fm4x8,8181
3
3
  lt_tensor/_torch_commons.py,sha256=_2Eck-MsQ46PxW5ku7NJvNSL5vg54_4GkLCqdzFevwA,402
4
4
  lt_tensor/lr_schedulers.py,sha256=oLYw2X78KSdlOD0pwPO0lsBj1xqLOAzT8rnRBnCO19o,3560
5
5
  lt_tensor/math_ops.py,sha256=4jUTtS1ZwJnh1AaFGhMuKTcakjwLQ846AKcBoDEwudI,1862
6
- lt_tensor/misc_utils.py,sha256=EaQ__986n5J-oAnMXmTp9hXxCDk6NrgvGlU_C05M7G4,19193
6
+ lt_tensor/misc_utils.py,sha256=Zo9p-iwRLNwVBk5kRP5sPCw7IiOBST9hW7LBK9JKCVs,19189
7
7
  lt_tensor/monotonic_align.py,sha256=LhBd8p1xdBzg6jQrQX1j7b4PNeYGwIqM24zcU-pHOLE,2239
8
- lt_tensor/transform.py,sha256=J6KFmOmQCeCpbK7r8yaUZ8RiW-o-rvtSFvBVM5utBhk,9208
8
+ lt_tensor/transform.py,sha256=CbTzqRUzl-U-2KMHtYUgiliU_61H3cag8a-N526nzdg,9124
9
9
  lt_tensor/model_zoo/__init__.py,sha256=sIidI3gSoxTq2OTenqADiFlmd9EH8rS_mzjLePdNHqc,77
10
10
  lt_tensor/model_zoo/basic.py,sha256=Ccjg26-gnqbkOUg0aNnLhZmsfvMwqTxXVXimfC5qnl0,1862
11
11
  lt_tensor/model_zoo/residual.py,sha256=iViJ5MrIY1vUbPB0ZiOjh62wfQagbPulMvbZPTXp-OU,7370
@@ -14,8 +14,8 @@ lt_tensor/model_zoo/diffusion/models.py,sha256=LRf5B2MPic4Dwfvg2PxG61KFtqvATV3wO
14
14
  lt_tensor/model_zoo/transformer_models/__init__.py,sha256=NOvCP-EySkNHLbGOxFMURp0AztvJQSNo9J_0hsEzLto,130
15
15
  lt_tensor/model_zoo/transformer_models/models.py,sha256=Xh2nq83w0qMX-Co7EmaQb_auq7Fi7kyULklc0_yq3oo,4088
16
16
  lt_tensor/model_zoo/transformer_models/positional_encoders.py,sha256=ilJDKAonnU0973BT_7gT5ke_8PbWHMxsr8EvNQHAcUY,3529
17
- lt_tensor-0.0.1.dev1.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
18
- lt_tensor-0.0.1.dev1.dist-info/METADATA,sha256=Os0vIySmcMifWqS32PHnLRTz2dW_VfF-tf_jhNcmPBk,1055
19
- lt_tensor-0.0.1.dev1.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
20
- lt_tensor-0.0.1.dev1.dist-info/top_level.txt,sha256=35FuhFeXnUyvHWdbVHGPh0hS8euofafnJ_GJAVSF4Kk,10
21
- lt_tensor-0.0.1.dev1.dist-info/RECORD,,
17
+ lt_tensor-0.0.1.dev3.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
18
+ lt_tensor-0.0.1.dev3.dist-info/METADATA,sha256=cIBisih0DD2ZXdcHxjEUofVmPG8L0BxhIiym7AIkVSo,1055
19
+ lt_tensor-0.0.1.dev3.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
20
+ lt_tensor-0.0.1.dev3.dist-info/top_level.txt,sha256=35FuhFeXnUyvHWdbVHGPh0hS8euofafnJ_GJAVSF4Kk,10
21
+ lt_tensor-0.0.1.dev3.dist-info/RECORD,,