returnn 1.20250211.215623__py3-none-any.whl → 1.20250216.155246__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.

Potentially problematic release.


This version of returnn might be problematic. Click here for more details.

returnn/PKG-INFO CHANGED
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: returnn
3
- Version: 1.20250211.215623
3
+ Version: 1.20250216.155246
4
4
  Summary: The RWTH extensible training framework for universal recurrent neural networks
5
5
  Home-page: https://github.com/rwth-i6/returnn/
6
6
  Author: Albert Zeyer
@@ -1,2 +1,2 @@
1
- version = '1.20250211.215623'
2
- long_version = '1.20250211.215623+git.8640885'
1
+ version = '1.20250216.155246'
2
+ long_version = '1.20250216.155246+git.1355f14'
@@ -44,25 +44,27 @@ def specaugment(
44
44
  x_masked = x
45
45
  spatial_len = spatial_dim.get_dim_value_tensor()
46
46
  # time mask
47
- x_masked = random_mask(
48
- x_masked,
49
- mask_axis=spatial_dim,
50
- broadcast_axis=feature_dim,
51
- min_num=rf.minimum(step1 + step2, spatial_len),
52
- max_num=rf.minimum(
53
- rf.maximum(spatial_len // num_spatial_mask_factor, 2) * (step0 + step1 + step2 * 2), spatial_len
54
- ),
55
- max_dims=max_consecutive_spatial_dims,
56
- )
47
+ if max_consecutive_spatial_dims > 0 and num_spatial_mask_factor > 0:
48
+ x_masked = random_mask(
49
+ x_masked,
50
+ mask_axis=spatial_dim,
51
+ broadcast_axis=feature_dim,
52
+ min_num=rf.minimum(step1 + step2, spatial_len),
53
+ max_num=rf.minimum(
54
+ rf.maximum(spatial_len // num_spatial_mask_factor, 2) * (step0 + step1 + step2 * 2), spatial_len
55
+ ),
56
+ max_dims=max_consecutive_spatial_dims,
57
+ )
57
58
  # feature mask
58
- x_masked = random_mask(
59
- x_masked,
60
- mask_axis=feature_dim,
61
- broadcast_axis=spatial_dim,
62
- min_num=step1 + step2,
63
- max_num=step0 * 2 + step1 + step2 * 2,
64
- max_dims=max_consecutive_feature_dims,
65
- )
59
+ if max_consecutive_feature_dims > 0:
60
+ x_masked = random_mask(
61
+ x_masked,
62
+ mask_axis=feature_dim,
63
+ broadcast_axis=spatial_dim,
64
+ min_num=step1 + step2,
65
+ max_num=step0 * 2 + step1 + step2 * 2,
66
+ max_dims=max_consecutive_feature_dims,
67
+ )
66
68
  return x_masked
67
69
 
68
70
  return rf.cond(rf.get_run_ctx().train_flag | (not only_on_train), _mask_branch, lambda: x)
@@ -1477,6 +1477,10 @@ class TorchBackend(Backend[torch.Tensor]):
1477
1477
  elif mode == "mean":
1478
1478
  mask_value = 0
1479
1479
  correction_factor = rf.masked_fraction_of_shape(axis, inverse=True)
1480
+ elif mode == "all":
1481
+ mask_value = True
1482
+ elif mode == "any":
1483
+ mask_value = False
1480
1484
  else:
1481
1485
  raise NotImplementedError(f"reduce_{mode} not implemented with masking on tensor {source!r}.")
1482
1486
  for dim in axis:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: returnn
3
- Version: 1.20250211.215623
3
+ Version: 1.20250216.155246
4
4
  Summary: The RWTH extensible training framework for universal recurrent neural networks
5
5
  Home-page: https://github.com/rwth-i6/returnn/
6
6
  Author: Albert Zeyer
@@ -1,9 +1,9 @@
1
- returnn/PKG-INFO,sha256=1no-Aukog5H0Mvgs1485nTteX29Fjp-sH7_kGvbMHG4,5215
1
+ returnn/PKG-INFO,sha256=9t6Xs3We7RWGbRVGOnZBXT4SZd2GGRmGv-WEAUk64SU,5215
2
2
  returnn/__init__.py,sha256=biBtRsM0WZ406vShaeH-9WFoqJ8XwTbn6g0EeFJ7l8E,1012
3
3
  returnn/__main__.py,sha256=qBFbuB1yN3adgVM5pXt2-Yq9vorjRNchNPL8kDKx44M,31752
4
4
  returnn/__old_mod_loader__.py,sha256=nvsNY-xELdS_IPNkv66Q9Rmvg4dbGW0-EBRDcCmctos,7654
5
5
  returnn/__setup__.py,sha256=22kQn2fh11iPM0hLb2Fy5sLmoU1JGvmDxXRYuRgQkwU,4659
6
- returnn/_setup_info_generated.py,sha256=xvdH59j45tyParGsCGfKR4RXzo9TQAImKpm20b4ylGk,77
6
+ returnn/_setup_info_generated.py,sha256=8r3qFPJ-iC6jC5sAl9bHpms0G1qv_QL7xYo9i8uhyH4,77
7
7
  returnn/config.py,sha256=3tmKhB6FnQZaNdtcYsiB61JnEY--iZ2qmJ4yq0b6tE0,29140
8
8
  returnn/forward_iface.py,sha256=A_OJiaXsX4MlXQRzST86ylyxSUZbC402PQL1REcqHjM,911
9
9
  returnn/learning_rate_control.py,sha256=ZvWryAn_tv9DhV8sh1LV3eE34Yltl3On3mYZAG4hR9s,34684
@@ -129,7 +129,7 @@ returnn/frontend/_native/tensor_ops.cpp,sha256=G_geJq_9yaTYoG7YsZydiTTkJoqdYB-D8
129
129
  returnn/frontend/_native/tensor_ops.hpp,sha256=dDqvUejRNHjItnmOP5aHyAQbAmXmXoDVXSe3tveEU8A,3732
130
130
  returnn/frontend/audio/__init__.py,sha256=8mahwucBje8qHKw0bOvoySlvvD0rFKxviSvcAHSjiJY,67
131
131
  returnn/frontend/audio/mel.py,sha256=VZdxf2mTLzLOXsLRzCvaad712Zf0c2iwdthrzeVfgxk,7885
132
- returnn/frontend/audio/specaugment.py,sha256=6GvVkLdRvwyrRkBr0E0kzvbX22W5e6INDQDMWDkOJJY,5604
132
+ returnn/frontend/audio/specaugment.py,sha256=nw8PepKPPwmI13-QyGBm45QjnoY4I_FEjA-_X6KIwzM,5798
133
133
  returnn/frontend/conversions/__init__.py,sha256=7plsDxWVYhASa-3qmqbdzSI34A9ujUH2iMkL3eRD0TI,84
134
134
  returnn/frontend/conversions/espnet_e_branchformer.py,sha256=Mmp3G6nySy0CqeHa-um-RAuUSnFH1DKNjBbqQB_Pomo,9018
135
135
  returnn/frontend/conversions/hf_llama.py,sha256=1WQOhQyUWwkAznaRqK2zpThP8XZbaomkaE8qMG_bZPY,9662
@@ -216,7 +216,7 @@ returnn/torch/data/queued_data_iter.py,sha256=PoOsGHdHVZjTmcyfq_ZOw--P6hyfTdmAWI
216
216
  returnn/torch/data/returnn_dataset_wrapper.py,sha256=1Bw82-Ge_8m_DSDXZNqQ3zGDic2HQlp6jysELL0NVK0,7369
217
217
  returnn/torch/data/tensor_utils.py,sha256=-Teqi--LLbt6q_5mDRdoHZHmPgSdC83W706ukif_YiU,1284
218
218
  returnn/torch/frontend/__init__.py,sha256=AA48HZnC17ASuKA0EWy8loZ-Bib_yUtqF4T1wYvjst4,62
219
- returnn/torch/frontend/_backend.py,sha256=h_rUhBPxLRgpZSqX4C8vX8q4dHWMhZpwPmGbKN6MsZo,99995
219
+ returnn/torch/frontend/_backend.py,sha256=sdC4kj7_2wyEVxX536TunbY4VbFaScSnMIBi1F27bsE,100128
220
220
  returnn/torch/frontend/_rand.py,sha256=1JgIkV2XmpgJD86zXZ-NCAe-QuoP2swr6NaS1oz3Qa8,1830
221
221
  returnn/torch/frontend/bridge.py,sha256=Z2_UW8AagezC7zsXDc5PKcd8G9WwisV7j9SWGHU0m4U,7840
222
222
  returnn/torch/frontend/raw_ops.py,sha256=lF0h-KtYYsdaaqQADylVZp9qzPskOOXA4MfmYDyx5IU,296
@@ -253,8 +253,8 @@ returnn/util/sig_proc.py,sha256=Tjz0VOAVyqu2qDCF5HZ1JjALjcFsHcNkcd96WgZeKfE,7265
253
253
  returnn/util/task_system.py,sha256=y4sMVXQ25Qd2z0rx03uOlXlkE-jbCYC1Sjfn-XlraVU,26003
254
254
  returnn/util/train_proc_manager.py,sha256=Pjht28k6uz6BNQ47uW6Gf880iyq5q4wx7P_K2tmoAM8,3266
255
255
  returnn/util/watch_memory.py,sha256=BR5P2kvBN6UI81cE0_1WAA6Hd1SByLbBaiDxvLhPOew,4213
256
- returnn-1.20250211.215623.dist-info/LICENSE,sha256=ywBD_U2aD4vpuoIgNAsjIGBYydl0tVKll3De0Z8s77c,11041
257
- returnn-1.20250211.215623.dist-info/METADATA,sha256=1no-Aukog5H0Mvgs1485nTteX29Fjp-sH7_kGvbMHG4,5215
258
- returnn-1.20250211.215623.dist-info/WHEEL,sha256=P9jw-gEje8ByB7_hXoICnHtVCrEwMQh-630tKvQWehc,91
259
- returnn-1.20250211.215623.dist-info/top_level.txt,sha256=Lsn4WZc5Pbfk0-xDQOgnFCxOoqxL4CyeM3N1TFbJncw,8
260
- returnn-1.20250211.215623.dist-info/RECORD,,
256
+ returnn-1.20250216.155246.dist-info/LICENSE,sha256=ywBD_U2aD4vpuoIgNAsjIGBYydl0tVKll3De0Z8s77c,11041
257
+ returnn-1.20250216.155246.dist-info/METADATA,sha256=9t6Xs3We7RWGbRVGOnZBXT4SZd2GGRmGv-WEAUk64SU,5215
258
+ returnn-1.20250216.155246.dist-info/WHEEL,sha256=P9jw-gEje8ByB7_hXoICnHtVCrEwMQh-630tKvQWehc,91
259
+ returnn-1.20250216.155246.dist-info/top_level.txt,sha256=Lsn4WZc5Pbfk0-xDQOgnFCxOoqxL4CyeM3N1TFbJncw,8
260
+ returnn-1.20250216.155246.dist-info/RECORD,,