Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ To release a new version, please update the changelog as followed:
- `tl.files` refactored into a directory with numerous files (by @DEKHTIARJonathan in #657)
- `tl.files.voc_dataset` fixed because of original Pascal VOC website was down (by @DEKHTIARJonathan in #657)
- extra requirements hidden inside the library added in the project requirements (by @DEKHTIARJonathan in #657)
- requirements files refactored in `requirements/` directory (by @DEKHTIARJonathan in #657)
- requirements files refactored in `requirements/` directory (by @DEKHTIARJonathan in #657)
- README.md and other markdown files have been refactored and cleaned. (by @zsdonghao @DEKHTIARJonathan @luomai in #639)
- Ternary Convolution Layer added in unittest (by @DEKHTIARJonathan in #658)
- Convolution Layers unittests have been cleaned & refactored (by @DEKHTIARJonathan in #658)
Expand All @@ -124,6 +124,7 @@ To release a new version, please update the changelog as followed:
- Typo of the document of ElementwiseLambdaLayer (by @zsdonghao in #588)
- Error in `tl.layers.TernaryConv2d` fixed - self.inputs not defined (by @DEKHTIARJonathan in #658)
- Deprecation warning fixed in `tl.layers.binary._compute_threshold()` (by @DEKHTIARJonathan in #658)
- All references to `tf.logging` replaced by `tl.logging` (by @DEKHTIARJonathan in #661)

### Security

Expand Down
4 changes: 2 additions & 2 deletions example/tutorial_tfrecord3.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,9 +260,9 @@ def prefetch_input_data(
for pattern in file_pattern.split(","):
data_files.extend(tf.gfile.Glob(pattern))
if not data_files:
tf.logging.fatal("Found no input files matching %s", file_pattern)
tl.logging.fatal("Found no input files matching %s", file_pattern)
else:
tf.logging.info("Prefetching values from %d files matching %s", len(data_files), file_pattern)
tl.logging.info("Prefetching values from %d files matching %s", len(data_files), file_pattern)

if is_training:
print(" is_training == True : RandomShuffleQueue")
Expand Down
12 changes: 6 additions & 6 deletions tensorlayer/nlp.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,8 +273,8 @@ class Vocabulary(object):

def __init__(self, vocab_file, start_word="<S>", end_word="</S>", unk_word="<UNK>", pad_word="<PAD>"):
if not tf.gfile.Exists(vocab_file):
tf.logging.fatal("Vocab file %s not found." % vocab_file)
tf.logging.info("Initializing vocabulary from file: %s" % vocab_file)
tl.logging.fatal("Vocab file %s not found." % vocab_file)
tl.logging.info("Initializing vocabulary from file: %s" % vocab_file)

with tf.gfile.GFile(vocab_file, mode="r") as f:
reverse_vocab = list(f.readlines())
Expand All @@ -294,7 +294,7 @@ def __init__(self, vocab_file, start_word="<S>", end_word="</S>", unk_word="<UNK

logging.info("Vocabulary from %s : %s %s %s" % (vocab_file, start_word, end_word, unk_word))
logging.info(" vocabulary with %d words (includes start_word, end_word, unk_word)" % len(vocab))
# tf.logging.info(" vocabulary with %d words" % len(vocab))
# tl.logging.info(" vocabulary with %d words" % len(vocab))

self.vocab = vocab # vocab[word] = id
self.reverse_vocab = reverse_vocab # reverse_vocab[id] = word
Expand Down Expand Up @@ -1094,7 +1094,7 @@ def moses_multi_bleu(hypotheses, references, lowercase=False):
)
os.chmod(multi_bleu_path, 0o755)
except Exception: # pylint: disable=W0702
tf.logging.info("Unable to fetch multi-bleu.perl script, using local.")
tl.logging.info("Unable to fetch multi-bleu.perl script, using local.")
metrics_dir = os.path.dirname(os.path.realpath(__file__))
bin_dir = os.path.abspath(os.path.join(metrics_dir, "..", "..", "bin"))
multi_bleu_path = os.path.join(bin_dir, "tools/multi-bleu.perl")
Expand Down Expand Up @@ -1122,8 +1122,8 @@ def moses_multi_bleu(hypotheses, references, lowercase=False):
bleu_score = float(bleu_score)
except subprocess.CalledProcessError as error:
if error.output is not None:
tf.logging.warning("multi-bleu.perl script returned non-zero exit code")
tf.logging.warning(error.output)
tl.logging.warning("multi-bleu.perl script returned non-zero exit code")
tl.logging.warning(error.output)
bleu_score = np.float32(0.0)

# Close temp files
Expand Down
4 changes: 2 additions & 2 deletions tests/test_array_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ def test_b4(self):

if __name__ == '__main__':

# tf.logging.set_verbosity(tf.logging.INFO)
tf.logging.set_verbosity(tf.logging.DEBUG)
# tl.logging.set_verbosity(tl.logging.INFO)
tl.logging.set_verbosity(tl.logging.DEBUG)

unittest.main()
4 changes: 2 additions & 2 deletions tests/test_layers_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def test_shape_n2(self):

if __name__ == '__main__':

# tf.logging.set_verbosity(tf.logging.INFO)
tf.logging.set_verbosity(tf.logging.DEBUG)
# tl.logging.set_verbosity(tl.logging.INFO)
tl.logging.set_verbosity(tl.logging.DEBUG)

unittest.main()
4 changes: 2 additions & 2 deletions tests/test_layers_convolution.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ def test_layer_n2(self):


if __name__ == '__main__':
# tf.logging.set_verbosity(tf.logging.INFO)
tf.logging.set_verbosity(tf.logging.DEBUG)
# tl.logging.set_verbosity(tl.logging.INFO)
tl.logging.set_verbosity(tl.logging.DEBUG)

unittest.main()
4 changes: 2 additions & 2 deletions tests/test_layers_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ def test_net8(self):

if __name__ == '__main__':

# tf.logging.set_verbosity(tf.logging.INFO)
tf.logging.set_verbosity(tf.logging.DEBUG)
# tl.logging.set_verbosity(tl.logging.INFO)
tl.logging.set_verbosity(tl.logging.DEBUG)

unittest.main()
4 changes: 2 additions & 2 deletions tests/test_layers_extend.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def test_params(self):

if __name__ == '__main__':

# tf.logging.set_verbosity(tf.logging.INFO)
tf.logging.set_verbosity(tf.logging.DEBUG)
# tl.logging.set_verbosity(tl.logging.INFO)
tl.logging.set_verbosity(tl.logging.DEBUG)

unittest.main()
4 changes: 2 additions & 2 deletions tests/test_layers_flow_control.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def test_net_n_params(self):

if __name__ == '__main__':

# tf.logging.set_verbosity(tf.logging.INFO)
tf.logging.set_verbosity(tf.logging.DEBUG)
# tl.logging.set_verbosity(tl.logging.INFO)
tl.logging.set_verbosity(tl.logging.DEBUG)

unittest.main()
4 changes: 2 additions & 2 deletions tests/test_layers_importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def test_slim_layer(self):

if __name__ == '__main__':

# tf.logging.set_verbosity(tf.logging.INFO)
tf.logging.set_verbosity(tf.logging.DEBUG)
# tl.logging.set_verbosity(tl.logging.INFO)
tl.logging.set_verbosity(tl.logging.DEBUG)

unittest.main()
4 changes: 2 additions & 2 deletions tests/test_layers_merge.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def test_net_image3(self):

if __name__ == '__main__':

# tf.logging.set_verbosity(tf.logging.INFO)
tf.logging.set_verbosity(tf.logging.DEBUG)
# tl.logging.set_verbosity(tl.logging.INFO)
tl.logging.set_verbosity(tl.logging.DEBUG)

unittest.main()
4 changes: 2 additions & 2 deletions tests/test_layers_normalization.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def test_n_params(self):

if __name__ == '__main__':

# tf.logging.set_verbosity(tf.logging.INFO)
tf.logging.set_verbosity(tf.logging.DEBUG)
# tl.logging.set_verbosity(tl.logging.INFO)
tl.logging.set_verbosity(tl.logging.DEBUG)

unittest.main()
4 changes: 2 additions & 2 deletions tests/test_layers_padding.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def test_n8_shape(self):

if __name__ == '__main__':

# tf.logging.set_verbosity(tf.logging.INFO)
tf.logging.set_verbosity(tf.logging.DEBUG)
# tl.logging.set_verbosity(tl.logging.INFO)
tl.logging.set_verbosity(tl.logging.DEBUG)

unittest.main()
4 changes: 2 additions & 2 deletions tests/test_layers_pooling.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def test_n13_shape(self):

if __name__ == '__main__':

# tf.logging.set_verbosity(tf.logging.INFO)
tf.logging.set_verbosity(tf.logging.DEBUG)
# tl.logging.set_verbosity(tl.logging.INFO)
tl.logging.set_verbosity(tl.logging.DEBUG)

unittest.main()
4 changes: 2 additions & 2 deletions tests/test_layers_recurrent.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ def test_net11(self):

if __name__ == '__main__':

# tf.logging.set_verbosity(tf.logging.INFO)
tf.logging.set_verbosity(tf.logging.DEBUG)
# tl.logging.set_verbosity(tl.logging.INFO)
tl.logging.set_verbosity(tl.logging.DEBUG)

unittest.main()
4 changes: 2 additions & 2 deletions tests/test_layers_shape.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def test_net3_n_params(self):

if __name__ == '__main__':

# tf.logging.set_verbosity(tf.logging.INFO)
tf.logging.set_verbosity(tf.logging.DEBUG)
# tl.logging.set_verbosity(tl.logging.INFO)
tl.logging.set_verbosity(tl.logging.DEBUG)

unittest.main()
4 changes: 2 additions & 2 deletions tests/test_layers_spatial_transformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def test_net_n_params(self):

if __name__ == '__main__':

# tf.logging.set_verbosity(tf.logging.INFO)
tf.logging.set_verbosity(tf.logging.DEBUG)
# tl.logging.set_verbosity(tl.logging.INFO)
tl.logging.set_verbosity(tl.logging.DEBUG)

unittest.main()
4 changes: 2 additions & 2 deletions tests/test_layers_special_activation.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def test_net2_n_params(self):

if __name__ == '__main__':

# tf.logging.set_verbosity(tf.logging.INFO)
tf.logging.set_verbosity(tf.logging.DEBUG)
# tl.logging.set_verbosity(tl.logging.INFO)
tl.logging.set_verbosity(tl.logging.DEBUG)

unittest.main()
4 changes: 2 additions & 2 deletions tests/test_layers_stack.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def test_unstack(self):

if __name__ == '__main__':

# tf.logging.set_verbosity(tf.logging.INFO)
tf.logging.set_verbosity(tf.logging.DEBUG)
# tl.logging.set_verbosity(tl.logging.INFO)
tl.logging.set_verbosity(tl.logging.DEBUG)

unittest.main()
4 changes: 2 additions & 2 deletions tests/test_layers_super_resolution.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def test_net2_n_params(self):

if __name__ == '__main__':

# tf.logging.set_verbosity(tf.logging.INFO)
tf.logging.set_verbosity(tf.logging.DEBUG)
# tl.logging.set_verbosity(tl.logging.INFO)
tl.logging.set_verbosity(tl.logging.DEBUG)

unittest.main()
4 changes: 2 additions & 2 deletions tests/test_layers_time_distributed.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def test_reuse(self):

if __name__ == '__main__':

# tf.logging.set_verbosity(tf.logging.INFO)
tf.logging.set_verbosity(tf.logging.DEBUG)
# tl.logging.set_verbosity(tl.logging.INFO)
tl.logging.set_verbosity(tl.logging.DEBUG)

unittest.main()
4 changes: 2 additions & 2 deletions tests/test_logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ def test_get_verbosity(self):

if __name__ == '__main__':

# tf.logging.set_verbosity(tf.logging.INFO)
# tl.logging.set_verbosity(tl.logging.INFO)
tf.logging.set_verbosity(tf.logging.DEBUG)
# tl.logging.set_verbosity(tl.logging.INFO)
tl.logging.set_verbosity(tl.logging.DEBUG)
tl.logging.set_verbosity(tl.logging.DEBUG)

unittest.main()
4 changes: 2 additions & 2 deletions tests/test_mnist_simple.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def test_reuse_vgg(self):

if __name__ == '__main__':

# tf.logging.set_verbosity(tf.logging.INFO)
tf.logging.set_verbosity(tf.logging.DEBUG)
# tl.logging.set_verbosity(tl.logging.INFO)
tl.logging.set_verbosity(tl.logging.DEBUG)

unittest.main()
4 changes: 2 additions & 2 deletions tests/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def test_reuse_vgg(self):

if __name__ == '__main__':

# tf.logging.set_verbosity(tf.logging.INFO)
tf.logging.set_verbosity(tf.logging.DEBUG)
# tl.logging.set_verbosity(tl.logging.INFO)
tl.logging.set_verbosity(tl.logging.DEBUG)

unittest.main()
4 changes: 2 additions & 2 deletions tests/test_optimizer_amsgrad.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def test_training(self):

if __name__ == '__main__':

# tf.logging.set_verbosity(tf.logging.INFO)
tf.logging.set_verbosity(tf.logging.DEBUG)
# tl.logging.set_verbosity(tl.logging.INFO)
tl.logging.set_verbosity(tl.logging.DEBUG)

unittest.main()
4 changes: 2 additions & 2 deletions tests/test_reuse_mlp.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def test_reuse(self):

if __name__ == '__main__':

# tf.logging.set_verbosity(tf.logging.INFO)
tf.logging.set_verbosity(tf.logging.DEBUG)
# tl.logging.set_verbosity(tl.logging.INFO)
tl.logging.set_verbosity(tl.logging.DEBUG)

unittest.main()
4 changes: 2 additions & 2 deletions tests/test_utils_predict.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def test_case2(self):

if __name__ == '__main__':

# tf.logging.set_verbosity(tf.logging.INFO)
tf.logging.set_verbosity(tf.logging.DEBUG)
# tl.logging.set_verbosity(tl.logging.INFO)
tl.logging.set_verbosity(tl.logging.DEBUG)

unittest.main()