摘要: 1,一般描述 we saw that the accuracy of our model on the validation data would peak after training for a number of epochs, and would then start decreasing. 阅读全文
posted @ 2019-03-10 22:51 Augustone 阅读(1454) 评论(0) 推荐(0)
摘要: 1,tf.layers基础函数 conv2d(). Constructs a two-dimensional convolutional layer. Takes number of filters, filter kernel size, padding, and activation funct 阅读全文
posted @ 2019-03-10 22:23 Augustone 阅读(415) 评论(0) 推荐(0)
摘要: 1,以类的方式定义一个模型 class Model(object): def __init__(self): # Initialize variable to (5.0, 0.0) # In practice, these should be initialized to random values 阅读全文
posted @ 2019-03-10 21:29 Augustone 阅读(199) 评论(0) 推荐(0)
摘要: 1,share的内容 code to create the model, and the trained weights, or parameters, for the model 2,ways There are different ways to save TensorFlow models—d 阅读全文
posted @ 2019-03-10 21:10 Augustone 阅读(3863) 评论(0) 推荐(0)
摘要: 1,dataset的方法 Dataset.make_one_shot_iterator() or get_next() 2,使用python的方法-当eager mode enabled时 print('Elements of ds_tensors:')for x in ds_tensors: pr 阅读全文
posted @ 2019-03-10 20:34 Augustone 阅读(624) 评论(0) 推荐(0)
摘要: map, batch, shuffle 阅读全文
posted @ 2019-03-10 20:31 Augustone 阅读(158) 评论(0) 推荐(0)
摘要: 1,几种方法 Create a source dataset using one of the factory functions like Dataset.from_tensors, Dataset.from_tensor_slices or using objects that read fro 阅读全文
posted @ 2019-03-10 20:29 Augustone 阅读(1472) 评论(0) 推荐(0)
摘要: 1,tensor的特点 Tensors can be backed by accelerator memory (like GPU, TPU). Tensors are immutable 2,双向转换 TensorFlow operations automatically convert NumP 阅读全文
posted @ 2019-03-10 20:25 Augustone 阅读(1347) 评论(0) 推荐(0)
摘要: 1, def get_flat_weights(model): weight_names = [ name for name in model.get_variable_names() if "linear_model" in name and "Ftrl" not in name] weight_ 阅读全文
posted @ 2019-03-10 17:46 Augustone 阅读(346) 评论(0) 推荐(0)
摘要: 1, model_l1 = tf.estimator.LinearClassifier( feature_columns=base_columns + crossed_columns, optimizer=tf.train.FtrlOptimizer( learning_rate=0.1, l1_r 阅读全文
posted @ 2019-03-10 17:40 Augustone 阅读(519) 评论(0) 推荐(0)
摘要: 1,数字类型的 education_num = tf.feature_column.numeric_column('education_num')capital_gain = tf.feature_column.numeric_column('capital_gain')capital_loss = 阅读全文
posted @ 2019-03-10 17:33 Augustone 阅读(1774) 评论(0) 推荐(0)
摘要: 1,简单数pandas import pandas train_df = pandas.read_csv(train_file, header = None, names = census_dataset._CSV_COLUMNS)test_df = pandas.read_csv(test_fil 阅读全文
posted @ 2019-03-10 17:04 Augustone 阅读(969) 评论(1) 推荐(0)
摘要: 1,25张图片 plt.figure(figsize=(10,10)) for i in range(25): plt.subplot(5,5,i+1) //plt.subplot(a,b,i+1) a*b>=25 plt.xticks([]) plt.yticks([]) plt.grid(Fal 阅读全文
posted @ 2019-03-10 15:41 Augustone 阅读(2467) 评论(0) 推荐(0)