自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(33)
  • 收藏
  • 关注

转载 leetcode 617. Merge Two Binary Trees

Given two binary trees and imagine that when you put one of them to cover the other, some nodes of the two trees are overlapped while the others are not.You need to merge them into a new bi...

2018-02-28 23:21:00 68

转载 tflearn alexnet iter 10

他会自己下载数据:# -*- coding: utf-8 -*-""" AlexNet.Applying 'Alexnet' to Oxford's 17 Category Flower Dataset classification task.References: - Alex Krizhevsky, Ilya Sutskever & G...

2018-02-28 22:06:00 67

转载 自然语言处理中的Attention Model:是什么及为什么

摘自:http://blog.csdn.net/malefactor/article/details/50550211要是关注深度学习在自然语言处理方面的研究进展,我相信你一定听说过Attention Model(后文有时会简称AM模型)这个词。AM模型应该说是过去一年来NLP领域中的重要进展之一,在很多场景被证明有效。听起来AM很高大上,其实它的基本思想是相当直观简洁的。本文作者...

2018-02-28 18:25:00 62

转载 深度学习的seq2seq模型——本质是LSTM,训练过程是使得所有样本的p(y1,...,yT‘|x1,...,xT)概率之和最大...

from:https://baijiahao.baidu.com/s?id=1584177164196579663&wfr=spider&for=pcseq2seq模型是以编码(Encode)和解码(Decode)为代表的架构方式,seq2seq模型是根据输入序列X来生成输出序列Y,在翻译,文本自动摘要和机器人自动问答以及一些回归预测任务上有着广泛的运用。以encod...

2018-02-28 16:57:00 609

转载 java 提取主域名

import com.google.common.net.InternetDomainName;public static void main(String[] args) { InternetDomainName top = InternetDomainName.from("keyupgrade.spaceforupdate.download...

2018-02-28 09:31:00 398

转载 leetcode 657. Judge Route Circle

Initially, there is a Robot at position (0, 0). Given a sequence of its moves, judge if this robot makes a circle, which means it moves back tothe original place.The move sequence is represent...

2018-02-27 20:29:00 82

转载 leetcode 461. Hamming Distance

TheHamming distancebetween two integers is the number of positions at which the corresponding bits are different.Given two integersxandy, calculate the Hamming distance.Note:0 ≤x,y&lt...

2018-02-27 20:05:00 91

转载 leetcode 771. Jewels and Stones

You're given stringsJrepresenting the types of stones that are jewels, andSrepresenting the stones you have. Each character inSis a type of stone you have. You want to know how many of the...

2018-02-27 19:23:00 97

转载 循环遍历Java字符串字符的规范方法——类似python for ch in string

比如我将string作为CNN 文本处理输入: float [] input = new float[maxLength]; // 1 sentence by maxLenWords // int[] input = new int[batchSize * maxLength]; // 1 sentence by maxLenWords ...

2018-02-26 16:51:00 367

转载 包含utf8字符的 pickle 转 json的大坑处理过程

背景:希望将pickle转换为json,由于pickle里有utf8的字符,因此转换失败。转换代码如下:'''Convert a pkl file into json file'''import sysimport osimport pickleimport jsondef convert_dict_to_json(file_path):...

2018-02-26 12:09:00 267

转载 python pickle to json

ref: https://gist.github.com/Samurais/567ebca0f59c612eb977065008aad867'''Convert a pkl file into json file'''import sysimport osimport pickleimport jsondef convert_dict_t...

2018-02-26 09:57:00 143

转载 mac os lscpu 【转】

CPU Information on Linux and OS XThis is small blog post detailing how to obtain information on your CPU on Linux and Mac OSX. These commands give information such as the instruction set of the...

2018-02-25 18:04:00 380

转载 查看tensorflow pb模型文件的节点信息

查看tensorflow pb模型文件的节点信息:import tensorflow as tfwith tf.Session() as sess: with open('./quantized_model.pb', 'rb') as f: graph_def = tf.GraphDef() graph_def.ParseFrom...

2018-02-23 16:27:00 1085

转载 bazel编译tensorflow 生成libtensorflow_inference.so 和 libandroid_tensorflow_inference_java.jar

bazelbuild-copt//tensorflow/contrib/android:libtensorflow_inference.so --crosstool_top=//external:android/crosstool --host_crosstool_top=@bazel_tools//tools/cpp:toolchain --cpu=armeabi-v7a...

2018-02-18 19:25:00 341

转载 tensorflow 模型压缩

模型压缩为了将tensorflow深度学习模型部署到移动/嵌入式设备上,我们应该致力于减少模型的内存占用,缩短推断时间,减少耗电。有几种方法可以实现这些要求,如量化、权重剪枝或将大模型提炼成小模型。在这个项目中,我使用了 TensorFlow 中的量化工具来进行模型压缩。目前我只使用权重量化来减小模型大小,因为根据 Mac 上的测试结果,完整 8 位转换没有提供额外的好处,比如缩...

2018-02-18 19:21:00 144

转载 CNN tensorflow text classification CNN文本分类的例子

from:http://deeplearning.lipingyang.org/tensorflow-examples-text/TensorFlow examples (text-based)This page provides links to text-based examples (including code and tutorial for most examples...

2018-02-17 20:35:00 174

转载 使用Android Studio build tensorflow/examples/android——直接用android studio即可

使用Android Studio可以在Android Studio中直接打开tensorflow/examples/android,但是需要配置好你的gradle、sdk、ndkgradle必须要在3.3以上版本build_tool_version需要指定在25以上配置好你的ndk很重要:在android:build.gradle 中配置好你的bazel路径,...

2018-02-14 15:09:00 109

转载 TensorFlow Lite demo——就是为嵌入式设备而存在的,底层调用NDK神经网络API,注意其使用的tf model需要转换下,同时提供java和C++ API,无法使用tflite的见后...

Introduction to TensorFlow LiteTensorFlow Lite is TensorFlow’s lightweight solution for mobile and embedded devices. It enables on-device machine learning inference with low latency and a sma...

2018-02-14 11:02:00 470

转载 android NDK 神经网络API——是给tensorflow lite调用的底层API,应用开发者使用tensorflow lite即可...

eural Networks APIIn this document show more Understanding the Neural Networks API RuntimeNeural Networks API Programming ModelMore About OperandsRelated API referenceNeu...

2018-02-14 10:47:00 168

转载 python chunk 方式读取大文件——本质上还是file read自身支持

参考:https://stackoverflow.com/questions/519633/lazy-method-for-reading-big-file-in-python最优雅方式:file.readlines() takes in an optional size argument which approximates the number of lines rea...

2018-02-13 12:21:00 760

转载 将tflearn的模型保存为pb,给TensorFlow使用

参考:https://github.com/tflearn/tflearn/issues/964解决方法:"""Tensorflow graph freezerConverts Tensorflow trained models in .pbCode adapted from:https://gist.github.com/morgangiraud/249...

2018-02-12 18:07:00 567

转载 将TensorFlow模型变为pb——官方本身提供API,直接调用即可

TensorFlow: How to freeze a model and serve it with a pythonAPI参考:https://blog.metaflow.fr/tensorflow-how-to-freeze-a-model-and-serve-it-with-a-python-api-d4f3596b3adc官方的源码:https://github.co...

2018-02-12 16:11:00 205

转载 Ubuntu17.10 下配置caffe 仅CPU i386可以直接apt install caffe-cpu,但是怎么运行mnist代码我懵逼了...

Ubuntu16.04下配置caffe(仅CPU)参考:http://blog.csdn.net/zt_1995/article/details/56283249第二次配置caffe环境,依旧把之前犯过的错误重新走了一遍,不会配置的地方还是忘了,所以打算通过博客记录下来,方便以后学习使用。1.安装依赖包$ sudo apt-get install libpro...

2018-02-11 15:29:00 165

转载 tflearn中计算混淆矩阵方法——需要经过一步转换

def do_rnn_wordbag(trainX, testX, trainY, testY): y_test=testY #trainX = pad_sequences(trainX, maxlen=100, value=0.) #testX = pad_sequences(testX, maxlen=100, value=0.) # Co...

2018-02-07 15:59:00 287

转载 词袋模型 测试数据使用和训练数据一样的词汇表

def get_features_by_wordbag(): global max_features x_train, x_test, y_train, y_test=load_all_files() vectorizer = CountVectorizer( decode_erro...

2018-02-07 12:11:00 156

转载 word2vec和word embedding有什么区别?

word2vec和word embedding有什么区别?我知道这两个都能将词向量化,但有什么区别?这两个术语的中文是什么?from: https://www.zhihu.com/question/53354714个人理解是,word embedding 是一个将词向量化的概念,来源于Bengio的论文《Neural probab...

2018-02-07 11:54:00 250

转载 Privoxy shadowscocks代理

ubuntu已经启动好了sock5的代理, 代理为: 127.0.0.1:1080.#使用Privoxy将sock5代理映射为http代理.安装Privoxysudo apt-get updatesudo apt-get install privoxy配置Privoxy, 打开 /etc/privoxy/config,注释掉listen-address ...

2018-02-05 21:39:00 448

转载 Elasticsearch源码分析—线程池(十一) ——就是从队列里处理请求

Elasticsearch源码分析—线程池(十一) 转自:https://www.felayman.com/articles/2017/11/10/1510291570687.html线程池每个节点都有一些线程池来优化线程内存的消耗,按节点来配置管理。有些线程池还拥有与之关联的队列配置,用来允许挂住一些未处理的请求,而不是丢弃它。Elasticsearch对线程池的处理...

2018-02-05 12:12:00 146

转载 elasticsearch date_histogram

(5)Date Histogram Aggregation时间直方图聚合,专门对时间类型的字段做直方图聚合。这种需求是比较常用见得的,我们在统计时,通常就会按照固定的时间断(1个月或1年等)来做统计。下面统计学校中同一年出生的学生数。curl -XPOST "192.168.1.101:9200/student/student/_search?search_type=count"...

2018-02-03 15:28:00 321

转载 lucene 范围过滤

Lucene里面有关于Filter的整体知识下面,我们来看下具体的在代码里怎么实现,先来看下我们的测试数据Java代码idscorebooknameenametypepricedate11飘渺之旅pmzl...

2018-02-03 12:05:00 93

转载 elasticsearch _field_stats 源码分析

_field_stats实现的功能:https://www.elastic.co/guide/en/elasticsearch/reference/5.6/search-field-stats.html获取索引下字段的统计信息,如下表,同时还可以针对这些统计值进行过滤:Field statisticsThe field stats api is supported on s...

2018-02-03 11:00:00 165

转载 tflearn mnist 使用MLP 全连接网络一般都会加dropout哇

# -*- coding: utf-8 -*-""" Deep Neural Network for MNIST dataset classification task.References: Y. LeCun, L. Bottou, Y. Bengio, and P. Haffner. "Gradient-based learning applied...

2018-02-02 11:40:00 511

转载 https://www.threatminer.org/domain.php?q=blackschickens.xyz ——域名的信誉查询站点 还可以查IP...

https://www.threatminer.org/domain.php?q=blackschickens.xyzhttps://www.threatminer.org/host.php?q=62.112.9.52https://www.robtex.com/dns-lookup/79186fe6.blackschickens.xyz 查DNS转载于:https://w...

2018-02-01 15:05:00 1418

空空如也

空空如也

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

TA关注的人

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