diff --git a/x2paddle/core/util.py b/x2paddle/core/util.py index af232549439813976e68fe928d827e064f2e0d14..cc587487806df3d2f510f2e73aca6889b1498288 100644 --- a/x2paddle/core/util.py +++ b/x2paddle/core/util.py @@ -23,15 +23,6 @@ def string(param): return "\'{}\'".format(param) -def color_log(log_str): - try: - from colorama import init, Fore - init(autoreset=True) - print(Fore.RED + log_str) - except: - print(log_str) - - # This func will copy to generate code file def run_net(param_dir="./"): import os diff --git a/x2paddle/decoder/tf_decoder.py b/x2paddle/decoder/tf_decoder.py index e5e9f6a161f9878c57e0ac097a732c3e5f658bb4..7fc1ce3afde400a47441f03931fa9ceec3347b9b 100644 --- a/x2paddle/decoder/tf_decoder.py +++ b/x2paddle/decoder/tf_decoder.py @@ -14,7 +14,6 @@ from x2paddle.core.graph import GraphNode, Graph from x2paddle.core.fluid_code import FluidCode -from x2paddle.core.util import * from tensorflow.python.framework import tensor_util from tensorflow.python.platform import gfile from tensorflow.core.framework import attr_value_pb2 @@ -217,21 +216,21 @@ class TFDecoder(object): if need_define_shape > 0: if need_define_shape == 1: - color_log( + print( "\nUnknown shape for input tensor[tensor name: \"{}\"]". format(layer.name)) else: - color_log( + print( "\nShape[now is {}] for input tensor[tensor name: \"{}\"] not support yet" .format(shape, layer.name)) - color_log( + print( "Use your keyboard type the shape of input tensor below :)") right_shape_been_input = False while not right_shape_been_input: shape = input("Shape of Input(e.g. None,224,224,3): ") if shape.count("None") > 1: - color_log("Only 1 dimension can be None, type again:)") + print("Only 1 dimension can be None, type again:)") else: right_shape_been_input = True