摘要:tf.reduce_sum: 1 #coding=utf8 2 import tensorflow as tf 3 import numpy as np 4 5 tf.compat.v1.disable_eager_execution() 6 7 x = np.array([[[1, 2, 3],
阅读全文
摘要:https://docs.google.com/spreadsheets/d/1FLFJLzg7WNP6JHODX5q8BDgptKafq_slHpnHVbJIteQ/edit#gid=0
阅读全文
摘要:https://blog.csdn.net/huahuazhu/article/details/77161668 1 #encoding=utf-8 2 3 import tensorflow as tf 4 5 encode_embeddings = tf.constant([[1,2,3,4,5
阅读全文
摘要:http://zheming.wang/blog/2015/05/19/3AFF5BE8-593C-4F76-A72A-6A40FB140D4D/
阅读全文
摘要:For Tensorflow 1.2 and Keras 2.0, the line tf.contrib.rnn.core_rnn_cell.BasicLSTMCell should be replaced by tf.contrib.rnn.BasicLSTMCell.
阅读全文
摘要:#coding = utf8 import tensorflow as tf from tensorflow.examples.tutorials.mnist import input_data mnist = input_data.read_data_sets('../MNIST_data', one_hot=True) batch_size = 100 n_batch = mni...
阅读全文
摘要:参考: 1、Understanding Convolutional Neural Networks for NLP 2、Implementing a CNN for Text Classification in TensorFlow
阅读全文
摘要:参考: http://tflearn.org/examples/
阅读全文
摘要:skflow也即是 tf.contrib.learn, 是 TensorFlow 官方提供的另外一个对 TensorFlow 的高层封装,通过这个封装,用户可以和使用 sklearn 类似的方法使用 TensorFlow。 参考:Introduction to Scikit Flow 另一个高层封装
阅读全文
摘要:tf.scalar_summary('loss',self.loss) AttributeError: 'module' object has no attribute 'scalar_summary' 解决: tf.scalar_summary('images', images)改为:tf.sum
阅读全文
摘要:分为三个文件:mnist_inference.py:定义前向传播的过程以及神经网络中的参数,抽象成为一个独立的库函数;mnist_train.py:定义神经网络的训练过程,在此过程中,每个一段时间保存一次模型训练的中间结果;mnist_eval.py:定义测试过程。 #coding=utf8impo
阅读全文
摘要:原文链接在Tensorflow的教程里面,使用梯度下降算法训练神经网络时,都会提到一个使模型更加健壮的策略,即滑动平均模型。 基本思想 在使用梯度下降算法训练模型时,每次更新权重时,为每个权重维护一个影子变量,该影子变量随着训练的进行,会最终稳定在一个接近真实权重的值的附近。那么,在进行预测的时候,使用影子变量的值替代真实变量的值,可以得到更好的结果。 操作步骤 1 训练阶段:为每个可训练的...
阅读全文
摘要:如果不行的话,就用conda装吧 https://www.jianshu.com/p/d54546ab315e
阅读全文