随笔分类 - AI-人工智能:笔记
摘要:https://blog.csdn.net/weixin_42398658/article/details/84639391 https://blog.csdn.net/qq_31050167/article/details/79161077 https://pan.baidu.com/s/1VQa
阅读全文
摘要:1,introduction Estimator 会封装下列操作: 训练 评估 预测 导出以供使用 预创建的 Estimator,也可以编写自定义 Estimator。所有 Estimator(无论是预创建的还是自定义)都是基于 tf.estimator.Estimator 类的类 2,Estima
阅读全文
摘要:1,tf-data两个新的抽象类 dataset表示一系列元素,其中每个元素包含一个或多个 Tensor 对象 创建来源(例如 Dataset.from_tensor_slices()),以通过一个或多个 tf.Tensor 对象构建数据集。 应用转换(例如 Dataset.batch()),以通过
阅读全文
摘要:1,Goodness An intuitive interface—Structure your code naturally and use Python data structures. Quickly iterate on small models and small data. Easier
阅读全文
摘要:1,Sequential model model = tf.keras.Sequential() # Adds a densely-connected layer with 64 units to the model:model.add(layers.Dense(64, activation='re
阅读全文
摘要:1,获取数据 imdb = keras.datasets.imdb(train_data, train_labels), (test_data, test_labels) = imdb.load_data(num_words=10000) 2,查看处理变形数据 2.1,查看 print(train_
阅读全文
摘要:1,数据集下载 2,一系列数据检查 这一条特别 3,Create feature columns and input functions,特征列和输入函数 3.1,one-hot-encoding, normalization, and bucketization 3.2,数字型和分类型 fc =
阅读全文
摘要:1,机器学习的基本步骤 Import and parse the data sets. Select the type of model. Train the model. Evaluate the model's effectiveness. Use the trained model to ma
阅读全文
摘要: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.
阅读全文
摘要:1,tf.layers基础函数 conv2d(). Constructs a two-dimensional convolutional layer. Takes number of filters, filter kernel size, padding, and activation funct
阅读全文
摘要:1,以类的方式定义一个模型 class Model(object): def __init__(self): # Initialize variable to (5.0, 0.0) # In practice, these should be initialized to random values
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要:map, batch, shuffle
阅读全文
摘要: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
阅读全文
摘要:1,tensor的特点 Tensors can be backed by accelerator memory (like GPU, TPU). Tensors are immutable 2,双向转换 TensorFlow operations automatically convert NumP
阅读全文
摘要: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_
阅读全文
摘要:1, model_l1 = tf.estimator.LinearClassifier( feature_columns=base_columns + crossed_columns, optimizer=tf.train.FtrlOptimizer( learning_rate=0.1, l1_r
阅读全文
摘要:1,数字类型的 education_num = tf.feature_column.numeric_column('education_num')capital_gain = tf.feature_column.numeric_column('capital_gain')capital_loss =
阅读全文
摘要: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
阅读全文