上一页 1 2 3 4 5 6 7 8 9 ··· 26 下一页
摘要: 142. 环形链表 II 给定一个链表,返回链表开始入环的第一个节点。 如果链表无环,则返回 null。 为了表示给定链表中的环,我们使用整数 pos 来表示链表尾连接到链表中的位置(索引从 0 开始)。 如果 pos 是 -1,则在该链表中没有环。 说明:不允许修改给定的链表。 示例 1: 输入: 阅读全文
posted @ 2020-09-21 09:39 douzujun 阅读(117) 评论(0) 推荐(0) 编辑
摘要: 1. Introduction PDTB是基于一个简单的想法,即,篇章关系是建立在一组可识别的单词或短语(篇章连接词)或仅仅是在两个句子的邻接中。 本手册首先总结了PDTB-3中的新功能以及它与PDTB-2中的不同之处。 需要注意的是,PDTB-3中的每个token都标有其 出处,表明它是PDTB- 阅读全文
posted @ 2020-09-20 22:08 douzujun 阅读(544) 评论(0) 推荐(0) 编辑
摘要: 1. 查看模型每层输出详情 from torchsummary import summary summary(your_model, input_size = (channels, H, W)) input_size是根据你自己的网络模型的输入尺寸进行设置。 2. 梯度裁剪 import torch 阅读全文
posted @ 2020-09-20 12:03 douzujun 阅读(152) 评论(0) 推荐(0) 编辑
摘要: 感觉不错:Attention详解 阅读全文
posted @ 2020-09-19 16:34 douzujun 阅读(198) 评论(0) 推荐(0) 编辑
摘要: nvidia-smi:是用来查看GPU使用情况的。我常用这个命令判断哪几块GPU空闲,但是最近的GPU使用状态让我很困惑,于是把nvidia-smi命令显示的GPU使用表中各个内容的具体含义解释一下。 !/opt/bin/nvidia-smi 阅读全文
posted @ 2020-09-18 22:19 douzujun 阅读(133) 评论(0) 推荐(0) 编辑
摘要: 47. 全排列 II 给定一个可包含重复数字的序列,返回所有不重复的全排列。 示例: 输入: [1,1,2] 输出: [ [1,1,2], [1,2,1], [2,1,1] ] /* * @lc app=leetcode.cn id=47 lang=cpp * * [47] 全排列 II */ // 阅读全文
posted @ 2020-09-18 13:29 douzujun 阅读(130) 评论(0) 推荐(0) 编辑
摘要: 摘要 1. 引言(Introduction) 2. Annotation of Discourse Relations and their Arguments 显示连接词 Arg1论元位置,范围跨度都大 隐式连接词 阅读上下文来推断 AltLex、EntRel、NoRel用于不能提供隐含连接词的情况 阅读全文
posted @ 2020-09-17 10:52 douzujun 阅读(477) 评论(0) 推荐(0) 编辑
摘要: https://blog.csdn.net/qq_39636214/article/details/85036837 阅读全文
posted @ 2020-09-16 21:11 douzujun 阅读(277) 评论(0) 推荐(0) 编辑
摘要: 参考文章 Three-pass method 关键:阅读这篇论文三次,而不是一开始就开始,把你的路耕到最后。 1. 第一次阅读 第一次:给你一个大致的想法关于这篇论文(5-10分钟) 仔细阅读 标题(title),摘要(abstract),和引言(introduction) 阅读章节(section 阅读全文
posted @ 2020-09-16 20:13 douzujun 阅读(211) 评论(0) 推荐(0) 编辑
摘要: 目前工作: 扩预料工作 语义关系分析 阅读全文
posted @ 2020-09-16 19:24 douzujun 阅读(206) 评论(0) 推荐(0) 编辑
摘要: 226. 翻转二叉树 翻转一棵二叉树。 示例: 输入: 4 / \ 2 7 / \ / \ 1 3 6 9 输出: 4 / \ 7 2 / \ / \ 9 6 3 1 C++版本: /* * @lc app=leetcode.cn id=226 lang=cpp * * [226] 翻转二叉树 */ 阅读全文
posted @ 2020-09-16 08:46 douzujun 阅读(107) 评论(0) 推荐(0) 编辑
摘要: 0. 摘要 1. 引言 (1)有利于篇章文本结构化 (2)具有广泛的应用价值 篇章的因果关系:用于自动问答和事件关系抽取; 对比关系:用于研究情感分析; 扩展关系:用于自动文摘和篇章关键词抽取。 另外,在机器翻译中也得到广泛应用。 2. 语料资源 RSTDT、PDTB、HIT-CDTB RSTDT、 阅读全文
posted @ 2020-09-14 16:42 douzujun 阅读(1210) 评论(0) 推荐(0) 编辑
摘要: 94. 二叉树的中序遍历 给定一个二叉树,返回它的中序 遍历。 示例: 输入: [1,null,2,3] 1 \ 2 / 3 输出: [1,3,2] 递归解法: /* * @lc app=leetcode.cn id=94 lang=cpp * * [94] 二叉树的中序遍历 */ // @lc c 阅读全文
posted @ 2020-09-14 09:45 douzujun 阅读(157) 评论(0) 推荐(0) 编辑
摘要: 参考博客1 参考博客2 在PyTorch中,有一些对Tensor的操作不会真正改变Tensor的内容,改变的仅仅是Tensor中字节位置的索引。这些操作有: narrow(), view(), expand(), transpose() 例如执行view操作之后,不会开辟新的内存空间来存放处理之后的 阅读全文
posted @ 2020-09-09 17:14 douzujun 阅读(294) 评论(0) 推荐(0) 编辑
摘要: 笔记摘抄 笔记 import torch from torch import nn, optim from torch.utils.data import DataLoader from torchvision import transforms, datasets import visdom 1. 阅读全文
posted @ 2020-09-08 13:41 douzujun 阅读(538) 评论(0) 推荐(0) 编辑
摘要: 笔记摘抄 语料链接:https://pan.baidu.com/s/1wpP4t_GSyPAD6HTsIoGPZg 提取码:jqq8 数据格式如图: 导包: import os import sys import math from collections import Counter import 阅读全文
posted @ 2020-09-07 01:43 douzujun 阅读(1557) 评论(0) 推荐(1) 编辑
摘要: 全部代码 已训练模型 1. 聊天机器人综合介绍 1.1 知识点 1.2 聊天机器人分类 1.21 从领域划分 固定领域(技术支持) 固定领域(天气查询) 开放领域(娱乐助手) 1.22 从模式划分 检索模式 应用: 简单原理: 生成模式 应用: 简单原理: 1.23 从功能划分 问答型聊天机器人 任 阅读全文
posted @ 2020-09-05 12:41 douzujun 阅读(3606) 评论(0) 推荐(4) 编辑
摘要: 1. 生成式模型 2. 自动编码器(Auto-Encoder) 3. 变分自动编码器(Variational AutoEncoders) 4. 生成对抗网络(GAN,Generative Adversarial Networks) 4.1 判别式模型和生成式模型 4.2 GAN基本原理 4.3 判别 阅读全文
posted @ 2020-09-03 15:33 douzujun 阅读(996) 评论(0) 推荐(0) 编辑
摘要: 笔记摘抄 语料链接:https://pan.baidu.com/s/1YxGGYmeByuAlRdAVov_ZLg 提取码:tzao neg.txt和pos.txt各5000条酒店评论,每条评论一行。 1. 导包和设定超参数 import numpy as np import random impo 阅读全文
posted @ 2020-08-28 22:40 douzujun 阅读(4537) 评论(2) 推荐(1) 编辑
摘要: 笔记摘抄 1. transformer资料 transformers(以前称为pytorch-transformers和pytorch-pretrained-bert) 提供用于自然语言理解(NLU)和自然语言生成(NLG)的BERT家族通用结构(BERT,GPT-2,RoBERTa,XLM,Dis 阅读全文
posted @ 2020-08-27 17:35 douzujun 阅读(18047) 评论(0) 推荐(4) 编辑
摘要: 视频讲解 直接看这个-->Github 导包: import re import math import torch import numpy as np from random import * import torch.nn as nn import torch.optim as optim i 阅读全文
posted @ 2020-08-25 00:46 douzujun 阅读(2048) 评论(0) 推荐(0) 编辑
摘要: 1. ELMO 2. BERT 就是Transformer的Encoder部分:输入input,输出embedding 如果处理中文,用 字 作为单位 (潮水--词,潮--字) 2.1 预测Masked word 2.2 [SEP] 和 [CLS] [SEP]:两个句子的 边界 [CLS]:输出 分 阅读全文
posted @ 2020-08-22 16:00 douzujun 阅读(376) 评论(0) 推荐(0) 编辑
摘要: https://www.cnblogs.com/linzhenyu/p/13277552.html 阅读全文
posted @ 2020-08-20 16:32 douzujun 阅读(461) 评论(0) 推荐(0) 编辑
摘要: 摘抄 1. 爬取京东商品评论 JD.py import requests from urllib.parse import quote from urllib.parse import urlencode from lxml import etree import logging import js 阅读全文
posted @ 2020-08-19 22:33 douzujun 阅读(1855) 评论(2) 推荐(0) 编辑
摘要: 笔记摘抄 Transformer模型(文本分类仅用到Encoder部分): 1. 数据预处理 和上一个博客https://www.cnblogs.com/douzujun/p/13511237.html中的数据和预处理都一致。 import numpy as np import torch from 阅读全文
posted @ 2020-08-17 21:06 douzujun 阅读(4097) 评论(3) 推荐(1) 编辑
摘要: 摘抄笔记 语料链接:https://pan.baidu.com/s/1aDIp3Hxw-Xuxcx-lQ_0w9A 提取码:hpg7 train.txt pos/neg各500条,一共1000条(用于训练模型) dev.txt pos/neg各100条,一共200条(用于调参数) test.txt 阅读全文
posted @ 2020-08-16 00:46 douzujun 阅读(12295) 评论(5) 推荐(1) 编辑
摘要: https://blog.csdn.net/qq_40210472/article/details/87895626 1. nn.Conv2d nn.Conv2d 输入信号的形式为(N, Cin, H, W), N表示batch size,Cin​表示channel个数,H,W分别表示特征图的高和宽 阅读全文
posted @ 2020-08-10 23:05 douzujun 阅读(1515) 评论(0) 推荐(0) 编辑
摘要: 1. 导入包 import os import torch import torch.nn as nn from torch.autograd import Variable import torch.utils.data as Data import torchvision import torc 阅读全文
posted @ 2020-08-07 20:02 douzujun 阅读(477) 评论(0) 推荐(1) 编辑
摘要: 1. 创建vocabulary 学习词向量的概念 用Skip-thought模型训练词向量 学习使用PyTorch dataset 和 dataloader 学习定义PyTorch模型 学习torch.nn中常见的Module Embedding 学习常见的PyTorch operations bm 阅读全文
posted @ 2020-08-03 22:16 douzujun 阅读(2438) 评论(0) 推荐(0) 编辑
摘要: https://www.jianshu.com/p/8ea7fba72673 https://pytorch.org/tutorials/beginner/data_loading_tutorial.html num_works设置过高出错(多线程错误,使用gpu就没事了) https://blog 阅读全文
posted @ 2020-08-03 18:25 douzujun 阅读(3035) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 ··· 26 下一页