logo
publist
写文章

简介

该用户还未填写简介

擅长的技术栈

可提供的服务

暂无可提供的服务

LSTM简单的文本生成

模型原理:利用LSTM模型,用前面的单词预测下一个单词。例如 I like the world.我们在这句话的首尾加上<s>和</s>,<s>代表开始</s>代表结束。 Input data是 <s> I like theworld.,labels 为I like the world.</s>.代码:import torchi

#自然语言处理#pytorch#深度学习
RNN LSTM GRU 代码实战 ---- 简单的文本生成任务

RNN LSTM GRU 代码实战 ---- 简单的文本生成任务import torchif torch.cuda.is_available():# Tell PyTorch to use the GPU.device = torch.device("cuda")print('There are %d GPU(s) available.' % torch.cuda.device_count())p

#python#自然语言处理#深度学习 +1
文本分类模型对比

使用kashgari快速搭建文本分类模型,对比各个模型间的正确率。import kashgarifrom kashgari.embeddings import BERTEmbedding# chinese_roberta_wwm_largebert_embed = BERTEmbedding('chinese_roberta_wwm_large', task=kashgari.CLASSIFICA

#自然语言处理#深度学习#tensorflow
意图识别bert

import sysimport osimport copyimport jsonimport loggingimport argparseimport torchimport numpy as npfrom tqdm import tqdm, trangeimport torch.nn as nnfrom torchcrf import CRFfrom torch.utils.data impo

#深度学习#pytorch#机器学习 +1
bert命名实体识别

导入命名实体import torchimport pandas as pdimport numpy as nppath = './'comments = pd.read_csv(path + '英文命名实体信息.csv', encoding="latin1").fillna(method="ffill")print('命名实体总数:%d' % comments.shape[0])Tags = li

#机器学习#自然语言处理#深度学习 +1
Bert 结构详解

Bert 结构详解1 Bert 模型结构图1,我们导入bert 14 分类model,并且打印出模型结构。https://blog.csdn.net/frank_zhaojianbo/article/details/107547338?spm=1001.2014.3001.5501图 2 是BertForSequenceClassification 模型的结构,可以看出 bert Model 有两

#bert#transformer#深度学习
bert中文情感分析多分类任务详解

查看GPU版本和使用情况import torchif torch.cuda.is_available():device = torch.device("cuda")print('There are %d GPU(s) available.' % torch.cuda.device_count())print('We will use the GPU:', torch.cuda.get_device

#自然语言处理#深度学习#pytorch +1
bert中文情感分析二分类任务详解

查看GPU版本和使用情况import torchif torch.cuda.is_available():device = torch.device("cuda")print('There are %d GPU(s) available.' % torch.cuda.device_count())print('We will use the GPU:', torch.cuda.get_device

#自然语言处理#机器学习#pytorch +1
Skip-Gram 代码详解(pytorch)

import torchimport torch.nn as nnimport torch.nn.functional as Fimport torch.utils.data as tudfrom collections import Counterimport numpy as npimport randomimport mathimport pandas as pdimp...

#自然语言处理#机器学习#pytorch +1
手写skip-gram pytorch

import torchimport numpy as npimport torch.nn.functional as Ffrom torch.autograd import Variablefrom collections import Counterimport randomMAX_VOCAB_SIZE = 30000S = 'F:\\机器学习高级'path = S + "...

#自然语言处理#pytorch#深度学习 +1
    共 15 条
  • 1
  • 2
  • 请选择