随笔分类 - TensorFlow
1
摘要:Concatenates tensors along one dimension.
阅读全文
摘要:# 'value' is a tensor with shape [5, 30] # Split 'value' into 3 tensors with sizes [4, 15, 11] along dimension 1 split0, split1, split2 = tf.split(value, [4, 15, 11], 1) tf.shape(split0) # [5, 4] tf...
阅读全文
摘要:"""An example of how to use your own dataset to train a classifier that recognizes people. """ # MIT License # # Copyright (c) 2016 David Sandberg # # Permission is hereby granted, free of charge, ...
阅读全文
摘要:人脸矫正有几个问题。 1.歪头: 2.侧脸: 3.半边脸:缺失另外半边脸,要寻找其他的解决方案。 大多数情况下,截取到的人脸是包含歪头和侧脸的现象的。这两个问题,可以同时通过仿射变换来矫正。 但是要注意,侧脸,是缺少一部分脸部信息的。 人脸矫正,对歪头的正确度提高有帮助,对侧脸就一般了。 思路: 1
阅读全文
摘要:1. tf.variable_scope生成一个上下文管理器,用于获取已经生成的变量 2.计算图。在程序的开始,最好显式声明一个计算图,多个不同的图可以在不同的线程中计算,显卡的优势就显示出来了。 3. 4. 5. 6.
阅读全文
摘要:(本系列随笔持续更新) 这部分代码是基于参考中的链接,修改后适用于TensorFlow1.6.0版本的代码。由于TensorFlow的频繁更新,所以不一定支持后续新或者就版本,特此说明。 程序的最初版,来自“山人7” [参考1,参考2],但是在新的TensorFlow下面不能直接运行。 修改后版本,
阅读全文
摘要:(本系列随笔持续更新) 搭建要求 详细的搭建过程在 参考资料1 中已经有啦。 TensorFlow 1.6.0 OpenCV 2.4.8 仅仅是加载和读取图片的需要 Ubuntu 14.04 64bits 代码:加载图片,找出人脸。运行依赖detect_face.py 显示效果: 参考资料: 1 h
阅读全文
摘要:两层卷积层 训练速度慢了,但是精度提高了
阅读全文
摘要:tensorflow性能调优实践 https://www.jianshu.com/p/937a0ce99f56 2018.04.01 Deep Learning 之 最优化方法 https://blog.csdn.net/bvl10101111/article/details/72615621 20
阅读全文
摘要:import tensorflow as tf from sklearn.datasets import load_digits from sklearn.cross_validation import train_test_split from sklearn.preprocessing import LabelBinarizer #load data digits = load_digit...
阅读全文
摘要:解释 compute_accuracy 的计算原理: 来自:https://blog.csdn.net/cy_tec/article/details/52046806
阅读全文
摘要:import tensorflow as tf import numpy as np import matplotlib.pyplot as plt # # add layer # def add_layer(inputs, in_size, out_size,n_layer, activation_function = None): layer_name = '...
阅读全文
摘要:注意:有些浏览器可能支持的不好,推荐使用最新的Chrome 命令行输入: tensorboard --logdir=logs/
阅读全文
摘要:import tensorflow as tf import numpy as np import matplotlib.pyplot as plt def add_layer(inputs, in_size, out_size, activation_function = None): Weights = tf.Variable(tf.random_normal([i...
阅读全文
摘要:import tensorflow as tf import numpy as np def add_layer(inputs, in_size, out_size, activation_function = None): Weights = tf.Variable(tf.random_normal([in_size, out_size])) # hang lie ...
阅读全文
摘要:import tensorflow as tf input1 = tf.placeholder(tf.float32) input2 = tf.placeholder(tf.float32) output = tf.multiply(input1, input2) with tf.Session() as sess: print(ses...
阅读全文
摘要:加法 累加1 加3次
阅读全文
摘要:import tensorflow as tf matrix1 = tf.constant([[3,3]]) # 1X2 matrix2 = tf.constant([[2], [2]]) product = tf.matmul(matrix1, matrix2) #method 1 #sess = tf.Ses...
阅读全文
摘要:import tensorflow as tf import numpy as np # create data x_data = np.random.rand(100).astype(np.float32) y_data = x_data*0.1 + 0.3 ### create tensorflow structure start ### Weights ...
阅读全文
1