- 博客(4)
- 收藏
- 关注
原创 线性回归从0实现
线性回归从0实现import torchfrom matplotlib import pyplot as plt import numpy as npimport randomimport torch.utils.data as Dataimport torch.nn as nnfrom torch.nn import init import torch.optim as optimnum_inputs=2num_examples=1000true_w=[2, -3.4]true_
2021-01-13 17:26:04 97
原创 【论文阅读】Document-Level Relation Extraction with Reconstruction
【论文阅读】Document-Level Relation Extraction with Reconstruction1. motivationwhen a human understands a document with relationships, he or she pays more attention to learn entity pairs with relationships rather than ones without relationships.however, t
2021-01-13 16:17:17 743 1
原创 词向量
词向量one-hot representation词库V={apple, going, I, home, Machine,Learning}apple={1,0,0,0,0,0}machine={0,0,0,0,1,0}learning={0,0,0,0,0,1}其长度为词库的大小,length=|v|=10^5缺点:稀疏表示不能表达词与词相似性,句子之间相似性可以计算,但是单词之间相似性没法表示表达能力弱(如只用8维来表示单词,one-hot只能表示8个词,而词向量可以表示2^8或者
2020-12-27 15:51:04 142
原创 Numpy基础练习
Numpy 基础练习#coding=UTF-8#1.导入numpy库import numpy as np#2.建立一个一维数组 a 初始化为[4,5,6], (1)输出a 的类型(type)(2)输出a的各维度的大小(shape)(3)输出 a的第一个元素(值为4)#a = np.arange(4,7)a = np.array([4,5,6])print(a.dtype)print(a.shape)print(a[0])#3.建立一个二维数组 b,初始化为 [ [4, 5, 6],[
2020-11-28 21:56:33 2234
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人