
深度学习-实践
文章平均质量分 64
qq924178473
这个作者很懒,什么都没留下…
展开
-
TensorFlow系列——在自定义的标准estimator中使用tensorboard及打印中间数据
1、定义hook钩子函数用于获取指定名称的中间数据class YourOwnHook(tf.train.SessionRunHook): def __init__(self): np.set_printoptions(suppress=True) np.set_printoptions(linewidth=400) def before_run(self, run_context): """返回SessionRunArgs和sessio原创 2021-06-03 11:11:15 · 2011 阅读 · 0 评论 -
TensorFlow系列——一些api的使用场景及方式
1、string_split:在制作tfrecord的时候,将多个类别特征使用分隔符组装到一起,用一个特征列来存储,降低存储代价。而在训练时候使用string_split将其分隔,分别处理。cank原创 2021-05-31 11:40:30 · 451 阅读 · 0 评论 -
spark-scala系列——使用技巧+异常处理汇总
1、使用VectorAssembler()将多个dataframe数值列以及数组列合并到一列()中去问题描述:spark内部有优化处理,当使用rdd+row方式获取原创 2021-05-30 10:32:03 · 449 阅读 · 0 评论 -
TensorFlow系列——异常记录
1、tensorflow.python.framework.errors_impl.InvalidArgumentError: assertion failed: [Input values must be in the range 0 <= values < max_tokens with max_tokens=3] [[node model/category_encoding/Assert/Assert (defined at /work_place/python_proje...原创 2021-05-28 10:18:20 · 386 阅读 · 0 评论 -
TensorFlow系列——feature_column特征工具说明
一、一些工具1、三种本地打印输出非序列sequence数据的feature_column转换后的值的方法适用于TensorFlow1.ximport tensorflow as tffrom tensorflow.python.feature_column import feature_column_v2 as fc_v2from tensorflow.python.feature_column import feature_column as fc# 注意:只有方式2会检查输入数据是否原创 2021-05-16 18:24:13 · 3284 阅读 · 1 评论 -
TensorFlow系列——本地运行使用feature_column做特征工程
关键词:tf.contrib.data.parallel_interleave tf.data.TFRecordDataset input_layer make_initializable_iterator() train.MonitoredTrainingSession test_op.initializer parse_example data.Dataset.list_files data.experimental.make_batched_features_dataset da原创 2021-05-14 16:41:35 · 538 阅读 · 0 评论 -
TensorFlow系列——写tfrecord数据
涉及的概念:Example Tensor SequenceExample Feature涉及的写入方式python spark scala spark dataframe写入的数据类型int64 float32 string写入的特征类型VarlenFeature SparseFeature FixedLenFeature一、python方式写tfrecord二、spark scala方式写tfrecord三、spark dataframe方式写tfreco原创 2021-05-13 16:12:13 · 1134 阅读 · 1 评论 -
TensorFlow系列——环境相关
一、安装1、win10系统anaconda安装1.1、安装TensorFlow2.1.0版本问题 https://docs.floydhub.com/guides/environments/使用python版本3.6注意:TensorFlow2.3.0对应的python版本为3.7及3.8遇到问题:CondaVerificationError: The package for tensorboard located at解决方式:在文件目录中删掉对应的文件,重新con...原创 2021-05-13 11:44:29 · 195 阅读 · 0 评论 -
TensorFlow系列——在estimator中使用feature_column处理tfrecord特征
一、用于接口——现有的estimator模型1、读取tfrecord数据1.1、tfrecord中包含所有特征情况feature_schema = { # 包含了tfrecord里的所有特征,包括标签label "sex": tf.io.FixedLenFeature(shape=(1,), dtype=tf.int64), "age": tf.io.FixedLenFeature(shape=(1,), dtype=tf.int64)}# train_files就原创 2021-05-12 15:37:19 · 595 阅读 · 0 评论 -
tensorflow系列——读取tfrecord数据
一、创建 TrainSpec方式:1用于# 模型:model = tf.estimator.LinearClassifier( feature_columns=get_feature_columns(""), model_dir=FLAGS.model_dir, n_classes=2, optimizer=tf.train.AdamOptimizer(learning_rate=FLAGS.learning_ra原创 2021-05-11 18:01:51 · 985 阅读 · 0 评论 -
caffe中权值初始化方法
参考博客:http://www.cnblogs.com/tianshifu/p/6165809.html转载 2017-09-22 10:05:05 · 861 阅读 · 0 评论 -
Learning Face Hallucination in the Wild--阅读笔记
1、However, conventional hallucination methods are often designed for controlled settings and cannot handle varying conditions of pose, resolution degree, and blur.传统的方法有约束控制,不能处理多种姿态、像素深度及遮挡的情况。2、原创 2017-04-27 18:00:18 · 1321 阅读 · 0 评论 -
CNN中全连接层是什么样的?
名称:全连接。意思就是输出层的神经元和输入层的每个神经元都连接。例子: AlexNet 网络中第一个全连接层是这样的:layer { name: "fc6" type: "InnerProduct" bottom: "pool5" top:"fc6" param { lr_mult: 1 decay_mult: 1 } par原创 2016-09-22 15:24:41 · 31148 阅读 · 0 评论 -
tensorflow里的word2vec_basic代码解析
1、前提是手动已经下载好text8.zip数据,使用def read_data(filename)这个函数去读取zip里面的数据,调用了f = zipfile.ZipFile(filename, 'r' ,zipfile.ZIP_DEFLATED)这个函数,在得到文件描述符f后,调用data = tf.compat.as_str(f.read(f.namelist()[0])).split()函数原创 2016-10-12 14:37:11 · 2519 阅读 · 0 评论 -
MATLAB版Faster-RCNN代码解析
let's move:1、opts.caffe_version = 'caffe_faster_rcnn'; %设置caffe版本2、opts.gpu_id = auto_select_gpu; %auto_select_gpu是个函数,该函数就是查看你的电脑有几个gpu,然后挨个检查你的GPU的free-memory是不原创 2016-10-08 15:04:29 · 6342 阅读 · 0 评论 -
pvanet的问题--ImportError: dynamic module does not define init function (initcython_bbox)
参照:http://www.coin163.com/it/8981382003560309276/python-faster%20rcnn-Faster%20R-CNN如果发现哪个文件有类似提示就把那个文件里的:utils.cython_bbox改为utils.bbox,即可。原创 2016-11-22 14:57:24 · 5868 阅读 · 0 评论 -
对SSD的理解
1、SSD提供了一种用于目标检测的方法,仅仅使用了一个深度神经网络。--这是相对于RCNN的训练来说的,因为对于Faster Rcnn,需要训练RPN网络以及fast rcnn网络。2、SSD的特别之处:--就像摘要里说的那样,它把最终要输出的bounding box预先固定在默认设置好的特征图上,意思是你给网络输入一个图片,它肯定会产生很多特征图,而我就在特征图上预先声明好很多box原创 2016-12-30 15:38:13 · 8790 阅读 · 0 评论 -
CNN FOR LICENSE PLATE MOTION DEBLURRING--阅读笔记
1、We focus on blurred images from a real-life traffic surveillance system, on which we, for the first time, demonstrate that neural networks trained on artificial data provide superior reconstruction原创 2017-05-02 17:03:45 · 1301 阅读 · 1 评论 -
Deep Joint Face Hallucination and Recognition——阅读笔记
1、In this paper, we address this problem by jointly learning a deep model for two tasks, i.e. face hallucination and recognition.本文是连接两个任务模型:hallucination和recognition。2、The recognition subnetwork原创 2017-05-03 17:15:11 · 1177 阅读 · 0 评论 -
MATLAB讀寫hdf5—caffe讀取hdf5
1、將圖片數據寫入hdf5數據庫: h5create(filename, '/data', [dat_dims(1:end-1) Inf], 'Datatype', 'single', 'ChunkSize', [dat_dims(1:end-1) chunksz]); % width, height, channels, number h5create(filename, '/labe原创 2017-05-15 14:27:23 · 859 阅读 · 0 评论 -
caffe源码——Euclidean Loss是怎么实现的
引用:http://blog.youkuaiyun.com/fangjin_kl/article/details/54131144损失函数:对的偏导:对的偏导:-forward_cpu:template void EuclideanLossLayer::Forward_cpu(const vector*>& bottom, const vector*>& top) {原创 2017-05-09 14:31:05 · 1784 阅读 · 0 评论 -
softmax层(无loss)是什么样的?
名称:softmax_layer连接:softmax层一般连接的是全连接层和loss层这里有softmax层的来历解释,我感觉解释的很好:http://zhidao.baidu.com/link?url=brlk4rKSEl3AVbpu5cL8S9FZOeFF1nVES1lydYSa84ctjpSDU5dXZDo-1llgcnwubScZ2jaq194Mr8g52wk7cGZR8J747y原创 2016-09-22 16:33:12 · 4747 阅读 · 0 评论