- 博客(8)
- 资源 (6)
- 收藏
- 关注
原创 python链表类定义,列表转链表,leetcode本地调试
如果想用本地IDE调试leetcode上的题目,可以使用以下辅助类。class ListNode(): def __init__(self, val): if isinstance(val, int): self.val = val self.next = None elif isinstance(val, list): self.val = val[0] s.
2020-06-28 18:34:53 1383
原创 python二叉树类定义,列表转二叉树,leetcode本地调试
二叉树类定义:# Definition for a binary tree node.class TreeNode: def __init__(self, x): self.val = x self.left = None self.right = None def gatherAttrs(self): return ", ".join("{}: {}".format(k, getattr(self, k)) for
2020-05-12 10:15:12 896
原创 sqlalchemy八小时不访问与数据库断开MySQL server has gone away
使用python的sqlalchemy连接数据库,当不指定连接池的配置时,默认是使用连接池的,默认配置的连接回收pool_recycle=-1,就是永远不会回收。不过mysql配置当中默认连接超过8小时连接就是失效断开,这两者就冲突了。解决方法之一是将连接池连接回收时间设置小于8小时:engine = create_engine(db_url=“你的数据库连接地址”, pool_recycl...
2020-01-10 10:45:53 1066
原创 安装tensorflow-cpu报错tensorflow-cpu-estimator==1.15.1出错的解决方法
安装tensorflow CPU版本,1.15.0会报错误:Could not find a version that satisfies the requirement tensorflow-cpu-estimator==1.15.1 (from tensorflow-cpu) (from versions: )No matching distribution found for...
2019-11-21 14:39:17 3475 1
原创 restful接口设计经验
https://www.vinaysahni.com/best-practices-for-a-pragmatic-restful-api#envelope这一篇讲解restful风格接口设计经验的文章很不错,不只是照本宣科,有空翻译一下,先立个flag。...
2019-10-23 10:22:52 153 1
原创 读论文:检索式多轮问答,阿里的ESIM模型
这一篇<Sequential Attention-based Network for Neotic End-to-End Response Selection>,论文地址,是阿里刚刚七月份开源的模型框架。目前在DSTC7的Ubuntu和Advising数据集取得SOTA效果。介绍检索式多轮问答任务:对于检索式多轮问答任务,目前有两种主要的结构:1、sequence-base...
2019-08-20 10:12:13 1266
原创 读论文:Pooled Contextualized Embeddings for Named Entity Recognition
最近在看命名实体识别方向的最新的paper。在这个方向,18年年底有一篇<contextual string embedding for sequence labeling>,在CoNLL03 数据集的F1值超过BERT达到了93.09。做法是弄了个预训练的character_embedding,用character_embedding动态地生成word_embeddin...
2019-08-13 14:32:06 667
Sequence to Sequence Learning with Neural Networksv论文
2018-04-17
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人