Skip to content

Commit c24c745

Browse files
committed
don't use legacy keras anymore
1 parent 788ee0a commit c24c745

7 files changed

Lines changed: 17 additions & 23 deletions

File tree

src/main.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import argparse
33
# > Standard library
44
import os
5+
os.environ['TF_USE_LEGACY_KERAS'] = '0'
56
import time
67
import logging
78

tests/test_data_augments.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Imports
1+
import os
2+
os.environ['TF_USE_LEGACY_KERAS'] = '0'
23

3-
# > Standard library
44
import logging
55
import unittest
66
import sys

tests/test_dataloader.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
# Imports
2-
3-
# > Standard library
1+
import os
2+
os.environ['TF_USE_LEGACY_KERAS'] = '0'
43
import logging
54
from pathlib import Path
65
import sys

tests/test_datamanager.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
# Imports
2-
import argparse
3-
# > Standard library
4-
import logging
51
import os
2+
os.environ['TF_USE_LEGACY_KERAS'] = '0'
3+
import logging
64
from pathlib import Path
75
import sys
86
import tempfile

tests/test_lr_schedule.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
# Imports
2-
3-
# > Standard library
1+
import os
2+
os.environ['TF_USE_LEGACY_KERAS'] = '0'
43
import logging
54
import unittest
65
from pathlib import Path

tests/test_model_replacement.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
1-
# Imports
1+
import os
2+
os.environ['TF_USE_LEGACY_KERAS'] = '0'
3+
from pathlib import Path
4+
import sys
5+
import logging
6+
import unittest
27

38
# > Third party dependencies
49
import numpy as np
510
import tensorflow as tf
611
from tensorflow.keras import layers
712

8-
# > Standard library
9-
from pathlib import Path
10-
import sys
11-
import logging
12-
import unittest
13-
1413

1514
class TestReplaceLayers(unittest.TestCase):
1615
"""

tests/test_tokenizer.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
# Imports
2-
3-
# > Standard library
4-
import unittest
51
import os
2+
os.environ['TF_USE_LEGACY_KERAS'] = '0'
3+
import unittest
64
import json
75
from tempfile import TemporaryDirectory
86
import logging

0 commit comments

Comments
 (0)