上一页 1 2 3 4 5 6 7 8 ··· 19 下一页
摘要: from gevent import monkey from gevent.pool import Pool # 猴子补丁,替换底层thread/socket实现非阻塞 monkey.patch_all() import gevent import requests def func(url): p 阅读全文
posted @ 2020-10-15 14:20 致林 阅读(677) 评论(0) 推荐(0) 编辑
摘要: http://hadoop.apache.org/docs/r1.0.4/cn/hdfs_shell.html FS Shell 调用文件系统(FS)Shell命令应使用 bin/hadoop fs 的形式。 所有的的FS shell命令使用URI路径作为参数。URI格式是scheme://auth 阅读全文
posted @ 2020-09-29 16:24 致林 阅读(140) 评论(0) 推荐(0) 编辑
摘要: public static void main(String[] args) { String input = "我在[[中]][[国]]"; // ?匹配一个字符,+匹配一个或多个 Matcher matcher = Pattern.compile("(?<=\\[\\[)(\\S?)(?=\\] 阅读全文
posted @ 2020-09-23 19:36 致林 阅读(631) 评论(0) 推荐(0) 编辑
摘要: 需求背景 标记出一句话中所有关键词 inpu:我想买苹果手机,请问哪里可以买苹果手机 keyword:"苹果", "苹果手机", "哪里" result:我想买[[苹果手机]],请问[[哪里]]可以买[[苹果手机]] 10w条耗时:41ms 难点:需要考虑单词重叠问题(overlap),例如“苹果手 阅读全文
posted @ 2020-09-04 14:02 致林 阅读(951) 评论(0) 推荐(0) 编辑
摘要: 一、事务的基本要素(ACID) 1、原子性(Atomicity):事务开始后所有操作,要么全部做完,要么全部不做,不可能停滞在中间环节。事务执行过程中出错,会回滚到事务开始前的状态,所有的操作就像没有发生一样。也就是说事务是一个不可分割的整体,就像化学中学过的原子,是物质构成的基本单位。 2、一致性 阅读全文
posted @ 2020-08-25 11:16 致林 阅读(188) 评论(0) 推荐(0) 编辑
摘要: docker运行elasticsearch docker pull elasticsearch:7.8.1 docker run -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" elasticsearch:7.8.1 pom <de 阅读全文
posted @ 2020-08-19 09:44 致林 阅读(2408) 评论(0) 推荐(0) 编辑
摘要: 问题描述: Suppressed: org.elasticsearch.client.ResponseException: method [PUT], host [http://localhost:9200], URI [/search/doc/4?timeout=1m], status line 阅读全文
posted @ 2020-08-18 20:36 致林 阅读(5983) 评论(0) 推荐(0) 编辑
摘要: import random import pandas as pd if __name__ == "__main__": df = pd.read_excel('../data/train.xlsx', dtype=str) result = [] for item in df.itertuples 阅读全文
posted @ 2020-08-06 11:30 致林 阅读(113) 评论(0) 推荐(0) 编辑
摘要: ![](https://img2020.cnblogs.com/blog/771778/202008/771778-20200806093411092-985705827.png) 阅读全文
posted @ 2020-08-06 09:34 致林 阅读(177) 评论(0) 推荐(0) 编辑
摘要: redis速度快的原因: 内存操作; 主线程通过变量获取IO多线程状态,变量不加锁,类似二维数组,每个线程操作自己的数组; 减少线程切换操作(6.x后采用多线程),IO多线程完成后采用空转而不是休眠,减少线程切换操作; IO多路复用(可理解为MapReduce)。 IO多线程优化:如果write线程 阅读全文
posted @ 2020-07-09 20:24 致林 阅读(141) 评论(0) 推荐(0) 编辑
摘要: tfserving模型部署见:https://www.cnblogs.com/bincoding/p/13266685.html demo代码:https://github.com/haibincoder/tf_tools 对应restful入参: { "inputs": { "input": [[ 阅读全文
posted @ 2020-07-09 17:30 致林 阅读(2907) 评论(6) 推荐(0) 编辑
摘要: 问题背景:python通过grpc调用tfserving报错, 提示:AttributeError: module 'tensorflow_serving.apis.prediction_service_pb2' has no attribute 'beta_create_PredictionSer 阅读全文
posted @ 2020-07-09 11:29 致林 阅读(1009) 评论(0) 推荐(0) 编辑
摘要: 官网:https://tensorflow.google.cn/tfx/guide/serving 步骤1:保存pb模型 # 为模型每一个参数添加name # ner demo: https://github.com/buppt/ChineseNER self.input_x = tf.placeh 阅读全文
posted @ 2020-07-08 14:26 致林 阅读(3188) 评论(0) 推荐(0) 编辑
摘要: ![](https://img2020.cnblogs.com/blog/771778/202006/771778-20200621003624587-1787216521.png) 阅读全文
posted @ 2020-06-21 00:37 致林 阅读(86) 评论(0) 推荐(0) 编辑
摘要: ![](https://img2020.cnblogs.com/blog/771778/202006/771778-20200610201952574-1942805732.jpg)![](https://img2020.cnblogs.com/blog/771778/202006/771778-20200610201956725-1987781509.jpg)![](https://img202... 阅读全文
posted @ 2020-06-10 20:22 致林 阅读(325) 评论(0) 推荐(0) 编辑
摘要: def f1Score(correct_label, predict_label): """ 计算混淆矩阵及f1得分 :param correct_label: 正确的分类标签 ['0','1','2','3'] :param predict_label: 预测的分类标签 :return: """ 阅读全文
posted @ 2020-05-22 09:41 致林 阅读(205) 评论(0) 推荐(0) 编辑
摘要: train loss 不断下降,test loss不断下降,说明网络仍在学习; train loss 不断下降,test loss趋于不变,说明网络过拟合; train loss 趋于不变,test loss不断下降,说明数据集100%有问题; train loss 趋于不变,test loss趋于 阅读全文
posted @ 2020-05-12 09:10 致林 阅读(842) 评论(0) 推荐(0) 编辑
摘要: 近几年来,基于神经网络的深度学习方法在计算机视觉、语音识别等领域取得了巨大成功,另外在自然语言处理领域也取得了不少进展。在NLP的关键性基础任务—命名实体识别(Named Entity Recognition,NER)的研究中,深度学习也获得了不错的效果。最近,笔者阅读了一系列基于深度学习的NER研 阅读全文
posted @ 2020-05-11 14:00 致林 阅读(10057) 评论(0) 推荐(0) 编辑
摘要: 文章目录前言经典方法WMD词移距离BM25深度文本匹配DSSMMatchPyramidESIMBiMPMDIINDRCN模型对比论文阅读Reference 前言 对于检索式对话系统最基本的步骤就是召回(retrieval) 匹配(matching) 排序(reranking)。匹配的得分直接决定最后 阅读全文
posted @ 2020-04-12 05:38 致林 阅读(1394) 评论(0) 推荐(0) 编辑
摘要: ![](https://img2020.cnblogs.com/blog/771778/202003/771778-20200314165953950-1692661329.png)![](https://img2020.cnblogs.com/blog/771778/202003/771778-20200314165957733-1758247810.png)![](https://img202... 阅读全文
posted @ 2020-03-14 17:01 致林 阅读(336) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 19 下一页