mttf 1.1.4__py3-none-any.whl → 1.1.6__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.
- mt/keras/__init__.py +32 -0
- mt/tf/init.py +3 -3
- mt/tf/version.py +1 -1
- {mttf-1.1.4.dist-info → mttf-1.1.6.dist-info}/METADATA +3 -3
- {mttf-1.1.4.dist-info → mttf-1.1.6.dist-info}/RECORD +14 -13
- {mttf-1.1.4.dist-info → mttf-1.1.6.dist-info}/WHEEL +1 -1
- {mttf-1.1.4.data → mttf-1.1.6.data}/scripts/dmt_pipi.sh +0 -0
- {mttf-1.1.4.data → mttf-1.1.6.data}/scripts/dmt_twineu.sh +0 -0
- {mttf-1.1.4.data → mttf-1.1.6.data}/scripts/pipi.sh +0 -0
- {mttf-1.1.4.data → mttf-1.1.6.data}/scripts/wml_nexus.py +0 -0
- {mttf-1.1.4.data → mttf-1.1.6.data}/scripts/wml_pipi.sh +0 -0
- {mttf-1.1.4.data → mttf-1.1.6.data}/scripts/wml_twineu.sh +0 -0
- {mttf-1.1.4.dist-info → mttf-1.1.6.dist-info}/licenses/LICENSE +0 -0
- {mttf-1.1.4.dist-info → mttf-1.1.6.dist-info}/top_level.txt +0 -0
mt/keras/__init__.py
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"""MT package that represents the working Keras 2 from the system."""
|
|
2
|
+
|
|
3
|
+
from packaging.version import Version
|
|
4
|
+
import tensorflow as tf
|
|
5
|
+
|
|
6
|
+
tf_ver = Version(tf.__version__)
|
|
7
|
+
if tf_ver >= Version("2.16"):
|
|
8
|
+
try:
|
|
9
|
+
import tf_keras
|
|
10
|
+
except:
|
|
11
|
+
raise ImportError(
|
|
12
|
+
f"mt.keras can only work with Keras 2. You have TF version {tf_ver}. Please install tf_keras."
|
|
13
|
+
)
|
|
14
|
+
from tf_keras import *
|
|
15
|
+
|
|
16
|
+
__version__ = tf_keras.__version__
|
|
17
|
+
__source__ = "tf_keras"
|
|
18
|
+
else:
|
|
19
|
+
try:
|
|
20
|
+
import keras
|
|
21
|
+
|
|
22
|
+
kr_ver = Version(keras.__version__)
|
|
23
|
+
except ImportError:
|
|
24
|
+
kr_ver = None
|
|
25
|
+
if kr_ver is None or kr_ver >= Version("3.0"):
|
|
26
|
+
__version__ = tf.__version__
|
|
27
|
+
__source__ = "tensorflow.python"
|
|
28
|
+
from tensorflow.keras import *
|
|
29
|
+
else:
|
|
30
|
+
__version__ = keras.__version__
|
|
31
|
+
__source__ = "keras"
|
|
32
|
+
from keras import *
|
mt/tf/init.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"""Initialises TensorFlow, monkey-patching if necessary."""
|
|
2
2
|
|
|
3
|
-
from packaging import
|
|
3
|
+
from packaging.version import Version
|
|
4
4
|
|
|
5
5
|
__all__ = ["init"]
|
|
6
6
|
|
|
@@ -11,9 +11,9 @@ def init():
|
|
|
11
11
|
import tensorflow
|
|
12
12
|
import sys
|
|
13
13
|
|
|
14
|
-
tf_ver =
|
|
14
|
+
tf_ver = Version(tensorflow.__version__)
|
|
15
15
|
|
|
16
|
-
if tf_ver <
|
|
16
|
+
if tf_ver < Version("2.8"):
|
|
17
17
|
raise ImportError(
|
|
18
18
|
f"The minimum TF version that mttf supports is 2.8. Your TF is {tf_ver}. "
|
|
19
19
|
"Please upgrade."
|
mt/tf/version.py
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mttf
|
|
3
|
-
Version: 1.1.
|
|
4
|
-
Summary: A package to detect and monkey-patch TensorFlow, for Minh-Tri Pham
|
|
3
|
+
Version: 1.1.6
|
|
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']
|
|
7
7
|
Project-URL: Documentation, https://mtdoc.readthedocs.io/en/latest/mt.tf/mt.tf.html
|
|
8
8
|
Project-URL: Source Code, https://github.com/inteplus/mttf
|
|
9
9
|
License-File: LICENSE
|
|
10
10
|
Requires-Dist: pyyaml
|
|
11
|
-
Requires-Dist: mtbase>=4.32
|
|
11
|
+
Requires-Dist: mtbase>=4.32.3
|
|
12
12
|
Requires-Dist: mtnet>=0.3.2
|
|
13
13
|
Dynamic: author
|
|
14
14
|
Dynamic: home-page
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
mt/keras/__init__.py,sha256=Qv3x6wnkG-ytMPzgQ8xPNe4NxxiD4z9RG23rvvLyRvg,883
|
|
1
2
|
mt/tf/__init__.py,sha256=M8xiJNdrAUJZgiZTOQOdfkehjO-CYzGpoxh5HVGBkms,338
|
|
2
|
-
mt/tf/init.py,sha256=
|
|
3
|
+
mt/tf/init.py,sha256=BUpw33uyA_DmeJjrN2fX4MIs8MynKxkwgc2oTGTqssU,1294
|
|
3
4
|
mt/tf/mttf_version.py,sha256=ha53i-H9pE-crufFttUECgXHwPvam07zMKzApUts1Gs,206
|
|
4
5
|
mt/tf/utils.py,sha256=Copl5VM0PpuFUchK-AcBuGO6QitDwHcEs4FruZb2GAI,2460
|
|
5
|
-
mt/tf/version.py,sha256=
|
|
6
|
+
mt/tf/version.py,sha256=WILNiQZrHE_E8TaKdRSqSywIA2x-8Z8oGUEwvLmUqMI,206
|
|
6
7
|
mt/tf/keras_applications/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
7
8
|
mt/tf/keras_applications/mobilenet_v3_split.py,sha256=1oPB3EX3k3c7iju9Ksuw9xyv32-mOKPs3uy2Mk5tLd8,19716
|
|
8
9
|
mt/tf/keras_applications/mobilevit.py,sha256=VsKB_U-f9jwUEjpd0eq-YXL4rDsuAbKQ0yIzkbMfLzw,9949
|
|
@@ -19,14 +20,14 @@ mt/tfc/__init__.py,sha256=XFXAbmEi5uTAuZj797cBqw9ZBnVy6ptxP0TTzVauMNk,8446
|
|
|
19
20
|
mt/tfg/__init__.py,sha256=6Ly2QImAyQTsg_ZszuAuK_L2n56v89Cix9yYmMVk0CM,304
|
|
20
21
|
mt/tfp/__init__.py,sha256=AQkGCkmDRwswEt3qoOSpxe-fZekx78sHHBs2ZVz33gc,383
|
|
21
22
|
mt/tfp/real_nvp.py,sha256=U9EmkXGqFcvtS2yeh5_RgbKlVKKlGFGklAb7Voyazz4,4440
|
|
22
|
-
mttf-1.1.
|
|
23
|
-
mttf-1.1.
|
|
24
|
-
mttf-1.1.
|
|
25
|
-
mttf-1.1.
|
|
26
|
-
mttf-1.1.
|
|
27
|
-
mttf-1.1.
|
|
28
|
-
mttf-1.1.
|
|
29
|
-
mttf-1.1.
|
|
30
|
-
mttf-1.1.
|
|
31
|
-
mttf-1.1.
|
|
32
|
-
mttf-1.1.
|
|
23
|
+
mttf-1.1.6.data/scripts/dmt_pipi.sh,sha256=NNsj4P332unHMqU4mAFjU9PQvxQ8TK5XQ42LC29IZY8,510
|
|
24
|
+
mttf-1.1.6.data/scripts/dmt_twineu.sh,sha256=KZhcYwuCW0c36tWcOgCe7uxJmS08rz-J6YNY76Exy4M,193
|
|
25
|
+
mttf-1.1.6.data/scripts/pipi.sh,sha256=kdo96bdaKq2QIa52Z4XFSiGPcbDm09SAU9cju6I2Lxo,289
|
|
26
|
+
mttf-1.1.6.data/scripts/wml_nexus.py,sha256=kW0ju8_kdXc4jOjhdzKiMsFuO1MNpHmu87skrhu9SEg,1492
|
|
27
|
+
mttf-1.1.6.data/scripts/wml_pipi.sh,sha256=CuidIcbuxyXSBNQqYRhCcSC8QbBaSGnQX0KAIFaIvKA,499
|
|
28
|
+
mttf-1.1.6.data/scripts/wml_twineu.sh,sha256=av1JLN765oOWC5LPkv2eSWIVof26y60601tMGkuYdb8,180
|
|
29
|
+
mttf-1.1.6.dist-info/licenses/LICENSE,sha256=e_JtcszdGZ2ZGfjcymTGrcxFj_9XPicZOVtnsrPvruk,1070
|
|
30
|
+
mttf-1.1.6.dist-info/METADATA,sha256=O8Ly1k7_qsC-jBLBywSh3jwYFRTCuaRfmfd3ovnAUos,567
|
|
31
|
+
mttf-1.1.6.dist-info/WHEEL,sha256=wXxTzcEDnjrTwFYjLPcsW_7_XihufBwmpiBeiXNBGEA,91
|
|
32
|
+
mttf-1.1.6.dist-info/top_level.txt,sha256=WcqGFu9cV7iMZg09iam8eNxUvGpLSKKF2Iubf6SJVOo,3
|
|
33
|
+
mttf-1.1.6.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|