原创 missing_range

#coding:utf-8 ''' Created on 2017-9-21 @author: 劉帥 ''' ## find missing ranges between low and high in the given ar

原创 numpy.expand_dims

numpy.expand_dims(a, axis)[source] Expand the shape of an array. Insert a new axis that will appear at t

原创 聊天機器人開發思路(樣板式模型)

最近打算弄一個智能客服的東西,就是輔助客服講述幫助用戶如何安裝電視機的流程。 現在記錄下吧: 一開始查了很多rnn,lstm,s2s等模型,發現都是那種生成式模型。 而且需要大量訓練集,效果不是很理想。 對於此任務應該是一個t

原创 Three_sum

#coding:utf-8 ''' Created on 2017-9-27 @author: 劉帥 ''' """ Given an array S of n integers, are there elements a, b

原创 tf.nn.conv2d

conv2d( input, filter, strides, padding, use_cudnn_on_gpu=None, data_format=None, name=

原创 tf.argmax()用法

tf.argmax(vector, 1):返回的是vector中的最大值的索引號,如果vector是一個向量,那就返回一個值,如果是一個矩陣,那就返回一個向量,這個向量的每一個維度都是相對應矩陣行的最大值元素的索引號。 impor

原创 rotate_array

#coding:utf-8 ''' Created on 2017-9-24 @author: 劉帥 ''' def rotate_new_list(nums,k):#新開一個數組 t = [] for i in

原创 python調用Hanlp進行命名實體識別

1 python與jdk版本位數一致 2 pip install jpype1(python3.5) 3 類庫hanlp.jar包、模型data包、配置文件hanlp.properties放在一個新建目錄 4 修改hanlp

原创 docker之exec

如何進入容器:docker exec -it 容器id或者名字 /bin/bash 點贊 收藏 分享 文章舉報 6丁一的貓 發佈了79 篇原創文章 · 獲贊 23 ·

原创 one_plus

#coding:utf-8 ''' Created on 2017-9-22 @author: 劉帥 ''' def plus_1(num_arr): #print enumerate(num_arr) #pri

原创 R-CNN原理

R-CNN講得比較好的文章: http://blog.csdn.net/shenxiaolu1984/article/details/51066975 http://blog.csdn.net/WoPawn/article/d

原创 summary_ranges

#coding:utf-8 ''' Created on 2017-9-25 ''' def summary_ranges(nums): res = [] if len(nums) == 1: r

原创 TF中的tf.Variable 和 tf.placehold 的區別

1 tf.placehold 佔位符。 主要爲真實輸入數據和輸出標籤的輸入, 用於在 feed_dict中的變量,不需要指定初始值,具體值在feed_dict中的變量給出。 2 tf.Variable 主要用於定義weights

原创 Sequence to Sequence 實現機器翻譯(keras demo)

最近在研究對話機器人,剛好看了幾篇論文,參考keras demo理解。 原理請參考: - Sequence to Sequence Learning with Neural Networks https://arxiv.

原创 人臉實時情緒與性別識別

最近弄一個情緒識別與性別識別的東東。 opencv + keras opencv用於人臉檢測 keras用於訓練出識別模型 數據集用於kaggle的(FER2013) CNN進行訓練。 代碼如下: import cv2 im