if __name__ == '__main__': os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2' # you can modify your file path file_train = './data/train.csv' file_test = './data/test.csv' embed_dim = 8 read_part = True sample_num = 6000000 test_si
时间: 2024-04-11 20:29:27 浏览: 126
ze = 1000000 # you can modify your model path model_path = './model' # parameters for training batch_size = 1024 epoch = 5 learning_rate = 0.001 # you can modify the number of hidden units hidden_units = [256, 128] # load data train_X, train_y, test_X, test_y, feature_columns, target_column = load_data(file_train, file_test, read_part, sample_num) # build model model = build_model(embed_dim, feature_columns, target_column, hidden_units) # train model train_model(model, train_X, train_y, test_X, test_y, batch_size, epoch, learning_rate) # save model model.save(model_path)
相关问题
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
这是一个设置环境变量的语句,用于设置 Tensorflow 的日志级别。其中,TF_CPP_MIN_LOG_LEVEL 环境变量可以设置 Tensorflow 的日志级别,其值为 0、1、2 或 3,分别对应不显示任何日志、只显示错误日志、显示错误和警告日志、显示所有日志。在这个语句中,将日志级别设置为了 2,表示只显示错误和警告日志。
os.environ['tf_cpp_min_log_level'] = '3'
这是一行Python代码,意思是将环境变量tf_cpp_min_log_level设置为3。这个变量是用来控制TensorFlow C++库的日志输出级别的,设置为3表示只输出错误信息,不输出警告和调试信息。
阅读全文