mttf 1.2.8__py3-none-any.whl → 1.2.9__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 mttf might be problematic. Click here for more details.

@@ -0,0 +1,14 @@
1
+ from .. import constraints as _constraints
2
+
3
+ for _x, _y in _layers.__dict__.items():
4
+ if _x.startswith("_"):
5
+ continue
6
+ globals()[_x] = _y
7
+ __doc__ = _constraints.__doc__
8
+
9
+ from .center_around import *
10
+
11
+
12
+ __api__ = [
13
+ "CenterAround",
14
+ ]
@@ -0,0 +1,17 @@
1
+ from .. import constraints
2
+
3
+
4
+ class CenterAround(keras.constraints.Constraint):
5
+ """Constrains weight tensors to be centered around `ref_value`."""
6
+
7
+ def __init__(self, ref_value: float = 0.0):
8
+ self.ref_value = ref_value
9
+
10
+ def __call__(self, w):
11
+ import tensorflow as tf
12
+
13
+ mean = tf.reduce_mean(w)
14
+ return w - (mean - self.ref_value)
15
+
16
+ def get_config(self):
17
+ return {"ref_value": self.ref_value}
mt/tf/version.py CHANGED
@@ -1,5 +1,5 @@
1
1
  MAJOR_VERSION = 1
2
2
  MINOR_VERSION = 2
3
- PATCH_VERSION = 8
3
+ PATCH_VERSION = 9
4
4
  version = '{}.{}.{}'.format(MAJOR_VERSION, MINOR_VERSION, PATCH_VERSION)
5
5
  __all__ = ['MAJOR_VERSION', 'MINOR_VERSION', 'PATCH_VERSION', 'version']
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mttf
3
- Version: 1.2.8
3
+ Version: 1.2.9
4
4
  Summary: A package to detect and monkey-patch TensorFlow and Keras, for Minh-Tri Pham
5
5
  Home-page: https://github.com/inteplus/mttf
6
6
  Author: ['Minh-Tri Pham']
@@ -4,6 +4,8 @@ mt/keras_src/base.py,sha256=_B2sSUMlHOtGSAqQD1p5YD0raEDL4W0Bh3uKD6BXOJM,807
4
4
  mt/keras_src/applications_src/__init__.py,sha256=mD9i8xbwpuvphcwxgS27MYwD2ZXWvyjyZtu1cBPIyTs,655
5
5
  mt/keras_src/applications_src/mobilenet_v3_split.py,sha256=EufzlbM2B5D_whpsDmfJFvyLSLtsoK6VXomaSE2K6Ms,19737
6
6
  mt/keras_src/applications_src/mobilevit.py,sha256=WSwTTT_VTPkH03XmRB_tFS1IgZf__HcVHwshjidSKaM,8934
7
+ mt/keras_src/constraints_src/__init__.py,sha256=PZIatDxYvkwOnoWlmMXV_EaAUTQx08GLPzBYIu-kmXE,248
8
+ mt/keras_src/constraints_src/center_around.py,sha256=xevS1Wq1nRIlSGEsxyGFUZ2PEb4Yxnsfpw7y2M4Ru8k,443
7
9
  mt/keras_src/layers_src/__init__.py,sha256=EnDoayl_SVb5cYyISiGbe0v5IPoklE4BgyJk-ft8SrI,746
8
10
  mt/keras_src/layers_src/counter.py,sha256=pFN50ZOpV4lvkKmKsK5hxfvAF0Jj46TtGqZOtND5eSc,852
9
11
  mt/keras_src/layers_src/floor.py,sha256=wPINhDnRYdbJ_eQqwq0pCXiez1sAryvGthQJULeN9yM,508
@@ -17,21 +19,21 @@ mt/tf/__init__.py,sha256=M8xiJNdrAUJZgiZTOQOdfkehjO-CYzGpoxh5HVGBkms,338
17
19
  mt/tf/init.py,sha256=bcm0t5tstxTkCBOiMX1SJxhKOz0MAZf-MYp2Mk0Gtas,502
18
20
  mt/tf/mttf_version.py,sha256=ha53i-H9pE-crufFttUECgXHwPvam07zMKzApUts1Gs,206
19
21
  mt/tf/utils.py,sha256=wau2vhPoPHu2cDxlc2lc9fxrndOXPdq2DNG4em5OOMI,1025
20
- mt/tf/version.py,sha256=8Xjlf27ZHmBgbMe3CQ0nbwlqv8s8hqctoe6De3gDDLs,206
22
+ mt/tf/version.py,sha256=cVsVB9uPHBY4El5-haRhSDftiGJTSaLdpK4_3EXYu-A,206
21
23
  mt/tf/keras_applications/__init__.py,sha256=m-A1rHGGLQgHX9690ENWXZkrU0vqfsJkZXcjIG3CLM0,142
22
24
  mt/tf/keras_layers/__init__.py,sha256=NsuFD-kSuy6cVV3Kl7ab95tw4g7x4Igv3cF-Ky3VuCo,124
23
25
  mt/tfc/__init__.py,sha256=XFnHJOPip-pT0MzUWGJ07GnNUJOhXluXLLULCY3Miac,9919
24
26
  mt/tfg/__init__.py,sha256=6Ly2QImAyQTsg_ZszuAuK_L2n56v89Cix9yYmMVk0CM,304
25
27
  mt/tfp/__init__.py,sha256=AQkGCkmDRwswEt3qoOSpxe-fZekx78sHHBs2ZVz33gc,383
26
28
  mt/tfp/real_nvp.py,sha256=U9EmkXGqFcvtS2yeh5_RgbKlVKKlGFGklAb7Voyazz4,4440
27
- mttf-1.2.8.data/scripts/dmt_pipi.sh,sha256=NNsj4P332unHMqU4mAFjU9PQvxQ8TK5XQ42LC29IZY8,510
28
- mttf-1.2.8.data/scripts/dmt_twineu.sh,sha256=KZhcYwuCW0c36tWcOgCe7uxJmS08rz-J6YNY76Exy4M,193
29
- mttf-1.2.8.data/scripts/pipi.sh,sha256=kdo96bdaKq2QIa52Z4XFSiGPcbDm09SAU9cju6I2Lxo,289
30
- mttf-1.2.8.data/scripts/wml_nexus.py,sha256=47P9PQMgb9w_-T0olC-dr3s60mKaQup-RWOuNi5mvJg,1192
31
- mttf-1.2.8.data/scripts/wml_pipi.sh,sha256=CuidIcbuxyXSBNQqYRhCcSC8QbBaSGnQX0KAIFaIvKA,499
32
- mttf-1.2.8.data/scripts/wml_twineu.sh,sha256=av1JLN765oOWC5LPkv2eSWIVof26y60601tMGkuYdb8,180
33
- mttf-1.2.8.dist-info/licenses/LICENSE,sha256=e_JtcszdGZ2ZGfjcymTGrcxFj_9XPicZOVtnsrPvruk,1070
34
- mttf-1.2.8.dist-info/METADATA,sha256=cP72kJZmoiDJDhqOEjfF5ajs0wLV8Coa4P1wKSAcm8s,567
35
- mttf-1.2.8.dist-info/WHEEL,sha256=DnLRTWE75wApRYVsjgc6wsVswC54sMSJhAEd4xhDpBk,91
36
- mttf-1.2.8.dist-info/top_level.txt,sha256=WcqGFu9cV7iMZg09iam8eNxUvGpLSKKF2Iubf6SJVOo,3
37
- mttf-1.2.8.dist-info/RECORD,,
29
+ mttf-1.2.9.data/scripts/dmt_pipi.sh,sha256=NNsj4P332unHMqU4mAFjU9PQvxQ8TK5XQ42LC29IZY8,510
30
+ mttf-1.2.9.data/scripts/dmt_twineu.sh,sha256=KZhcYwuCW0c36tWcOgCe7uxJmS08rz-J6YNY76Exy4M,193
31
+ mttf-1.2.9.data/scripts/pipi.sh,sha256=kdo96bdaKq2QIa52Z4XFSiGPcbDm09SAU9cju6I2Lxo,289
32
+ mttf-1.2.9.data/scripts/wml_nexus.py,sha256=47P9PQMgb9w_-T0olC-dr3s60mKaQup-RWOuNi5mvJg,1192
33
+ mttf-1.2.9.data/scripts/wml_pipi.sh,sha256=CuidIcbuxyXSBNQqYRhCcSC8QbBaSGnQX0KAIFaIvKA,499
34
+ mttf-1.2.9.data/scripts/wml_twineu.sh,sha256=av1JLN765oOWC5LPkv2eSWIVof26y60601tMGkuYdb8,180
35
+ mttf-1.2.9.dist-info/licenses/LICENSE,sha256=e_JtcszdGZ2ZGfjcymTGrcxFj_9XPicZOVtnsrPvruk,1070
36
+ mttf-1.2.9.dist-info/METADATA,sha256=LKDB1j-agJ1_910BbIiogJwQxCIni8HAjfGsnikKOFQ,567
37
+ mttf-1.2.9.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
38
+ mttf-1.2.9.dist-info/top_level.txt,sha256=WcqGFu9cV7iMZg09iam8eNxUvGpLSKKF2Iubf6SJVOo,3
39
+ mttf-1.2.9.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.4.0)
2
+ Generator: setuptools (80.9.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
File without changes
File without changes
File without changes