自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

用思想、知识和音乐去影响和改变

  • 博客(910)
  • 资源 (6)
  • 收藏
  • 关注

原创 tensorflow predictor by keras h5

1. keras model conver from h5 to pbfrom keras.models import load_modelimport tensorflow as tfimport os from keras import backend as K#路径参数weight_file_path = 'model.h5' output_graph_name = '...

2020-02-10 22:32:42 725

转载 词向量与Embedding究竟是怎么回事?

词向量,英文名叫Word Embedding,按照字面意思,应该是词嵌入。说到词向量,不少读者应该会立马想到Google出品的Word2Vec,大牌效应就是不一样。另外,用Keras之类的框架还有一个Embedding层,也说是将词ID映射为向量。由于先入为主的意识,大家可能就会将词向量跟Word2Vec等同起来,而反过来问“Embedding是哪种词向量?”这类问题,尤其是对于初学者来说,应该是...

2019-04-12 10:47:09 685

转载 从transformer 到 Bert

http://www.cnblogs.com/rucwxb/p/10277217.htmlhttps://zhuanlan.zhihu.com/p/49271699https://ai.googleblog.com/2017/08/transformer-novel-neural-network.htmlhttps://www.jianshu.com/p/ef41302edeefh...

2019-03-27 20:14:30 312

原创 【使用CNN进行文本分类】续:deploy keras model with docker + tensorflow serving

1. convert keras model .h5 to tensorflow serving modelimport tensorflow as tffrom keras import backend as Kfrom keras.models import Sequential, Modelfrom os.path import isfilefrom keras.layers ...

2018-11-30 14:58:36 1429

原创 multi-thread for keras model / what is model._make_predict_function() used for?

when call the predict for multi-thread, there is always exception: tensor *** is not an element of this graph.two ways to solve this problem:1) call model._make_predict_function() after load model...

2018-11-07 12:02:23 3156 3

转载 keras fit_generator

Let us suppose that your data are images. If you have many images you probably won't be able to load all of them in memory and you would like to read from disk in batches.Keras flow_from _directory ...

2018-10-16 19:42:55 561

原创 docker 容器的导出导入

导出:docker export container_id > output_file.tar导入:cat output_file.tar | docker import - imagename 

2018-09-06 13:22:50 242

转载 常见的图embedding的方法

参考代码:https://github.com/keras-team/keras/blob/master/examples/pretrained_word_embeddings.py转:https://blog.csdn.net/k284213498/article/details/83474972keras.layers.embeddings.Embedding(input_dim,...

2018-06-08 17:38:09 6853

转载 FM做feature embedding表示以及CTR loss function

FM算法是CTR预估中的经典算法,其优势是能够自动学习出交叉特征.因为这种特性,FM在CTR预估上的效果会远超LR.说明:通过FM的公式可以看出,FM自动学习交叉是通过学习到每个特征xi的向量表示vi得到的.比如说,对于field A,其特征有100w种取值,如果使用one-hot编码。那么,每个特征需要使用100w维特征表示.使用了FM算法学习之后,比如说使用vi的特征维度是10维.那么,每个特...

2018-06-08 11:49:58 3149

原创 tensorflow nmt 源码结构梳理

nmt.py main()->run_main(train_fn, inference_fn) 其中,train_fn指train.py中的train() run_main中,根据参数:flags.inference_input_file决定是走train逻辑还是走infer逻辑 如果是infer,则取最新的checkpoint,执行inference_fn 如果是train,则走train...

2018-06-05 20:22:01 1420

原创 resnet(残差网络)的F(x)究竟长什么样子?

比较好的数据推导:https://zhuanlan.zhihu.com/p/42706477想弄明白resnet的机制,看了不少网络资源,都提到“H(X)= F(X)+X。H映射计算复杂,F(X)计算相对简单,所以加深网络是OK的”。。。H(X)知道是什么,两个隐藏层节点多的话训练复杂也可以理解。但是没有那篇资料详细写过F(X)长啥样子?多少参数?为何它会比H(X)参数少?然后,resne...

2018-05-25 15:36:36 1227

转载 tensorflow embedding_lookup

the idea of the neural network above is to supply our input target words as one-hot vectors.  Then, via a hidden layer, we want to train the neural network to increase the probability of valid context...

2018-04-11 12:36:21 1016

转载 Keras关于LSTM的units参数,还是不理解?

LSTM(units,input_shape(3,1)),这里的units指的是cell的个数么?如果是,按照LSTM原理这些cell之间应该是无连接的,那units的多少其意义是什么呢,是不是相当于MLP里面对应隐层的神经元个数,只是为了扩展系统的输出能力?作者:lonlon ago链接:https://www.zhihu.com/question/64470274/answer/2563...

2018-03-06 00:39:20 24930 9

原创 keras 指定GPU

计数下标从1开始例:CUDA_VISIBLE_DEVICES=2 python3 predict_3.pyHow can I run a Keras model on multiple GPUs?We recommend doing so using the TensorFlow backend. There are two ways to run a single model on multip...

2018-03-04 23:08:43 1533

转载 keras 对于大数据的训练,无法一次性载入内存,使用迭代器

转处:http://blog.csdn.net/lujiandong1/article/details/54869170说明:我是在keras的官方demo上进行修改https://github.com/fchollet/keras/blob/master/examples/imdb_cnn.py1、几点说明,从文件中读入数据,会降低GPU的使用率,如果能够直接将数据载入内存,GPU的使用率会比较...

2018-03-04 00:08:59 6165 1

原创 mysql 导入导出数据的方法总结

1. 以文件形式导出数据mysql -P port -u username -h ip -p password -e "use database ;query sql into outfile 'data.txt' FIELDS TERMINATED BY ',' enclosed by '\"' lines terminated by '\r\n'"2. 以文件形式导入数据mysql -P po...

2018-02-02 15:42:47 302

转载 **[netty内存管理]netty

1. 背景最容易出错的提到第一行3.5. 内存池推送服务器承载了海量的长链接,每个长链接实际就是一个会话。如果每个会话都持有心跳数据、接收缓冲区、指令集等数据结构,而且这些实例随着消息的处理朝生夕灭,这就会给服务器带来沉重的GC压力,同时消耗大量的内存。最有效的解决策略就是使用内存池,每个NioEventLoop线程处理N个链路,在线程内部,链路的处理时串行的。假如

2017-09-12 21:07:11 964

原创 使用CNN进行文本分类

1.卷积神经网络简介卷积神经网络(Convolutional Neural Network,CNN)是一种前馈神经网络,它的人工神经元可以响应一部分覆盖范围内的周围单元,对于大型图像处理有出色表现。它包括卷积层(alternating convolutional layer)和池层(pooling layer)。卷积神经网络是近年发展起来,并引起广泛重视的一种高效识别方法。20

2017-09-06 23:08:33 8153 14

原创 Why is Java Future.get(timeout) & httpclient Not Reliable?

1.  Future.get(timeout)In Java project we sometime want to run our code during a limit time , we will consider about using Future.get(time, TimeUnit), While this will not always useful , look at the

2017-09-01 17:04:56 1287

转载 深入理解jvm的GC日志

CMS GC with -XX:+PrintGCDetails and -XX:+PrintGCTimeStamps prints a lot of information. Understanding this information can help in fine tuning various parameters of the application and CMS to achieve

2017-08-25 16:18:00 676

转载 理解深度学习中的卷积

http://www.hankcs.com/ml/understanding-the-convolution-in-deep-learning.html译自Tim Dettmers的Understanding Convolution in Deep Learning。有太多的公开课、教程在反复传颂卷积神经网络的好,却都没有讲什么是“卷积”,似乎默认所有读者都有相关基础。这篇外文既友

2017-07-28 22:48:39 790 1

转载 解决docker容器中文乱码,修改docker容器编码格式

前台上传文件到服务器后,服务器返回给前台的文件列表中出现中文乱码,所有的中文文件名全部变成?,英文文件名则正常显示。  问题经过定位,发现后台代码的multipartfile类在执行transterto的方法时就发生了此异常,然而配置文件集中的multipartResolver以及encodingFilter均已经设置成了UTF-8,排除代码异常。kubectl exec进入到docker

2017-07-06 10:45:58 5098

原创 一些讲RNN-lstm比较好的博客

Understanding LSTM Networkshttp://colah.github.io/posts/2015-08-Understanding-LSTMs/ An overview of gradient descent optimization algorithmshttp://sebastianruder.com/optimizing-gradient-descent/The Un...

2017-07-05 20:18:44 1517

原创 个性化推荐综述

注:由于人个技术水平有限,文中的技术及原理也都只是点到为止,文中的难免会有很多疏漏甚至错误,请大家指正(本文会陆续更新),同时有一些理论是参考各个牛人的研究成果,这里只是做以引用。个性化推荐的本质是帮助用户找到自己感兴趣的物品,这里包括电商网站的商品,在线视频网站的电影作品,以及音乐网站上的音乐作品,这些使用场景,都非常的适合应用个性化推荐技术,帮助用户找到那边感兴趣又不容易找到物品。...

2016-12-21 15:13:39 5141 2

转载 搜推广系统里的bias & debias

参考Paper《Bias and Debias in Recommender System: A Survey and Future Directions》1、selection bias选择性偏差指的是在研究过程中因样本选择的非随机性而导致得到的结论存在偏差。用户倾向于给自己喜欢或者不喜欢的物品进行打分。通常的解决办法有propensity score,同时学习打分预测任务和缺失数据预测任务。例如Improving Ad Click Prediction by Considering Non-

2022-01-21 00:09:47 479

转载 为什么卷积核通常都是奇数(1x1、3x3...)

1,为了方便same padding时的处理。如步长为1时,要补充k-1的zero padding才能使输出输出的尺寸一致,这时候如果核大小k是偶数,则需要补充奇数的zero padding,不能平均分到feature map的两侧。padding时对称:保证了 padding 时,图像的两边依然相 对称 。 在卷积时,我们有时候需要卷积前后的尺寸不变。这时候我们就需要用到padding。假设图像的大小,也就是被卷积对象的大小为nn,卷积核大小为kk,padding的幅度设为(k-1)/2时,卷积后的输

2022-01-20 23:58:54 1789

原创 Bert及其变种和应用场景

RoBERTa:https://zhuanlan.zhihu.com/p/103205929 使用动态mask FULL-SENTENCES without NSP 更大的bs 更大的byte-level BPE Soft-Masked BERT 修正网络是一个基于BERT的序贯多类标记模型 DistilBERT: 原理:这个的做法就是用蒸馏12层的BERT得到6层的DistilBERT,首先预训练好BERT,然后用训练BERT的大规模预料来蒸馏12层的BE...

2021-04-09 23:07:59 1892

原创 Learning to Rank 比较好的文章

1. 《机器学习排序算法:RankNet to LambdaRank to LambdaMART》https://www.cnblogs.com/genyuan/p/9788294.htmlhttps://zhuanlan.zhihu.com/p/686826072. 基于Ranklib的LTR原理:《LambdaMART简介——基于Ranklib源码(一 lambda计算)》https://www.cnblogs.com/wowarsenal/p/3900359.html3. 《Lam

2021-01-08 00:51:16 242

原创 GCN-note 汇总

No.1https://zhuanlan.zhihu.com/p/107162772No.2https://zhuanlan.zhihu.com/p/54505069No.3https://www.zhihu.com/question/54504471

2020-12-04 00:44:21 169

原创 GraphSage vs GCN

https://towardsdatascience.com/an-intuitive-explanation-of-graphsage-6df9437ee64fhttps://towardsdatascience.com/using-graphsage-to-learn-paper-embeddings-in-cora-a94bb1e9dc9dhttps://github.com/stellargraph/stellargraph/issues/457https://github.com/wi

2020-11-20 14:36:11 435

原创 基于Bert的NLG

《Unified Language Model Pre-training for Natural Language Understanding and Generation》《MASS: Masked Sequence to Sequence Pre-training for Language Generation》《BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translat.

2020-11-06 00:11:37 396

原创 multi-task learning 的主要几种结构

https://arxiv.org/pdf/1911.05034.pdfhttps://www.kdd.org/kdd2018/accepted-papers/view/modeling-task-relationships-in-multi-task-learning-with-multi-gate-mixture-

2020-10-15 23:12:03 322

转载 VAE vs GAN

AutoEncoderLimitations of autoencoders for content generationAt this point, a natural question that comes in mind is “what is the link between autoencoders and content generation?”. Indeed, once the autoencoder has been trained, we have both an encod

2020-09-29 16:16:46 289

转载 加权交叉熵损失函数:tf.nn.weighted_cross_entropy_with_logits

tf.nn.weighted_cross_entropy_with_logits函数tf.nn.weighted_cross_entropy_with_logits( targets, logits, pos_weight, name=None)定义在:tensorflow/python/ops/nn_impl.py。计算加权交叉熵。类似于sigmoid_cross_entropy_with_logits(),除了pos_weight,允许人们通过向上或...

2020-06-19 21:06:19 5933

转载 c 正则

#include <stdio.h>#include <string.h>#include <regex.h>#define SUBSLEN 10 /* 匹配子串的数量 */#define EBUFLEN 128 /* 错误消息buffer长度 */#define BUFLEN 1024 /* 匹配到的字符串buffer长度 */int main(){size_t .

2020-06-19 19:47:34 144

转载 keras bilstm 序列标注

from random import randomfrom numpy import arrayfrom numpy import cumsumfrom keras.models import Sequentialfrom keras.layers import LSTMfrom keras.layers import Densefrom keras.layers import TimeDistributed # create a sequence classification insta.

2020-06-07 13:00:06 364

转载 keras: 在构建LSTM模型时,使用变长序列的方法

众所周知,LSTM的一大优势就是其能够处理变长序列。而在使用keras搭建模型时,如果直接使用LSTM层作为网络输入的第一层,需要指定输入的大小。如果需要使用变长序列,那么,只需要在LSTM层前加一个Masking层,或者embedding层即可。 1 2 3 4 5 fromkeras.layersimportMasking, Embedding fromkeras.layersimportLSTM mod...

2020-06-07 12:33:38 620

转载 推荐系统遇上深度学习(十)--GBDT+LR融合方案实战

推荐系统遇上深度学习系列:推荐系统遇上深度学习(一)--FM模型理论和实践:https://www.jianshu.com/p/152ae633fb00推荐系统遇上深度学习(二)--FFM模型理论和实践:https://www.jianshu.com/p/781cde3d5f3d推荐系统遇上深度学习(三)--DeepFM模型理论和实践:https://www.jianshu.com/p/6f1c2643d31b推荐系统遇上深度学习(四)--多值离散特征的embedding解决方案:https://w

2020-05-31 00:05:30 564

原创 Bert albert xlnet gtp

《GPT,GPT2,Bert,Transformer-XL,XLNet论文阅读速递》Bert缺点Bert的自编码语言模型也有对应的缺点,就是XLNet在文中指出的,第一个预训练阶段因为采取引入[Mask]标记来Mask掉部分单词的训练模式,而Fine-tuning阶段是看不到这种被强行加入的Mask标记的,所以两个阶段存在使用模式不一致的情形,这可能会带来一定的性能损失;另外一个是,Ber...

2020-04-11 11:23:48 207

原创 从GBDT到XGBoost

http://wepon.me/files/gbdt.pdf 原始论文 :XGBoost: A Scalable Tree Boosting System 论文对应的中文版原理介绍:Boosted Tree xgboost导读和实战 速度快效果好的boosting模型 xgboost的slide...

2020-04-10 13:08:32 179

httpclient tutorial httpclient 指南

httpclient 指南 包括了详细的调用和常用代码 The Hyper-Text Transfer Protocol (HTTP) is perhaps the most significant protocol used on the Internet today. Web services, network-enabled appliances and the growth of network computing continue to expand the role of the HTTP protocol beyond user-driven web browsers, while increasing the number of applications that require HTTP support. Although the java.net package provides basic functionality for accessing resources via HTTP, it doesn't provide the full flexibility or functionality needed by many applications. HttpClient seeks to fill this void by providing an efficient, up-to-date, and feature-rich package implementing the client side of the most recent HTTP standards and recommendations. Designed for extension while providing robust support for the base HTTP protocol, HttpClient may be of interest to anyone building HTTP-aware client applications such as web browsers, web service clients, or systems that leverage or extend the HTTP protocol for distributed communication.

2018-03-08

mask rcnn paper

We present a conceptually simple, flexible, and general framework for object instance segmentation. Our approach efficiently detects objects in an image while simultaneously generating a high-quality segmentation mask for each instance. The method, called Mask R-CNN, extends Faster R-CNN by adding a branch for predicting an object mask in parallel with the existing branch for bounding box recognition. Mask R-CNN is simple to train and adds only a small overhead to Faster R-CNN, running at 5 fps. Moreover, Mask R-CNN is easy to generalize to other tasks, e.g., allowing us to estimate human poses in the same framework. We show top results in all three tracks of the COCO suite of challenges, including instance segmentation, bounding-box object detection, and person keypoint detection. Without tricks, Mask R-CNN outperforms all existing, single-model entries on every task, including the COCO 2016 challenge winners. We hope our simple and effective approach will serve as a solid baseline and help ease future research in instance-level recognition. Code will be made available.

2018-03-07

Applying Deep Learning To Answer Selection

Applying Deep Learning To Answer Selection- A Study And An Open Task

2018-03-07

Learning Phrase Representations using RNN Encoder–Decoder

Learning Phrase Representations using RNN Encoder–Decoder for Statistical Machine Translation

2018-03-07

BPTT BackPropagation Through Time.pdf

BPTT paper This report provides detailed description and necessary derivations for the BackPropagation Through Time (BPTT) algorithm. BPTT is often used to learn recurrent neural networks (RNN). Contrary to feed-forward neural networks, the RNN is characterized by the ability of encoding longer past information, thus very suitable for sequential models. The BPTT extends the ordinary BP algorithm to suit the recurrent neural architecture.

2018-03-07

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除