摘要:
![PyTorch实现断点继续训练](https://mp.weixin.qq.com/s?__biz=MzI5MDUyMDIxNA==&mid=2247556102&idx=3&sn=5977564462ff8c0db99ea044bc4dd3d4&chksm=ec1cf1ffdb6b78e95a8dec57e001c1db091cba7ec95fb5da27a3fb98f4c857297293 阅读全文
摘要:
Demo1 TfidfTransformer + CountVectorizer = TfidfVectorizer from sklearn.feature_extraction.text import TfidfVectorizer, TfidfTransformer corpus = [ 'T 阅读全文
摘要:
import spacy from tqdm import tqdm import numpy as np # In[8] def adj_dependcy_tree(argments, max_length=80): nlp = spacy.load('en') depend = [] depen 阅读全文
摘要:
nn.Parameter和F.linear class TextRNN(nn.Module): def __init__(self, input_size = 768, hidden_size = 164, output_size = 768, n_layers = 1, dropout = 0.1 阅读全文
摘要:
数据增强 自监督 GAN,VAE 对抗训练 https://zhuanlan.zhihu.com/p/91269728 (这个非常好!!!) 二阶段训练 迁移学习 其他 layerNorm可能有用 阅读全文
摘要:
https://segmentfault.com/a/1190000037592155 阅读全文
摘要:
import torch import torch.nn as nn from sklearn.preprocessing import LabelBinarizer from torch.nn import functional as F # In[4] class TextRNN(nn.Modu 阅读全文
摘要:
超级有用! 从上图的方程可以看出: 1、loss大则梯度更新量也大; 2、不同任务的loss差异大导致模型更新不平衡的本质原因在于梯度大小; 3、通过调整不同任务的loss权重wi可以改善这个问题; 4、直接对不同任务的梯度进行处理也可以改善这个问题; 所以,后续的方法大体分为两类: 1、在权重wi 阅读全文
摘要:
https://github.com/hujinsen/pytorch_VAE_CVAE/blob/master/CVAE.ipynb 阅读全文
摘要:
faqs = pd.read_csv('./data/FAQ.csv', sep='\t').iloc[:, 1:] faqs # In[3] faqs # In[3] # 切分数据 faqs_len = len(faqs) print('len(faqs):', faqs_len) X_train 阅读全文
摘要:
超好懂,宏观:https://www.sohu.com/a/342634291_651893 https://blog.csdn.net/weixin_43476533/article/details/105750702 https://zhuanlan.zhihu.com/p/138686535 阅读全文
摘要:
摘要 图结构数据上进行半监督学习的可拓展方法。该方法基于 直接在图上操作的卷积神经网络 的有效变体。 通过 谱图卷积的局部一阶近似 来激励我们选择 卷积结构。我们的模型在 图边 上的数量(number of graph edges)上线性缩放,并且学习隐藏层表示(其encode 局部图结构 和 结点 阅读全文
摘要:
客户端:(发送数据) import socket import json import time class Client(object): def __init__(self): self.serverIp = '' self.serverPort = 9991 self.bufferSize = 阅读全文
摘要:
# In[1] import pandas as pd import numpy as np import json import os import re # In[2] # !pwd os.chdir('./root/FAQ/') # In[2] with open('./data/all_da 阅读全文
摘要:
sports = ['跑步', '打球', '打', '强', '壮', '体育', '运动员', '运动', '活动', '训练', '得分', '比赛', '参赛', '赢', '球'] found = NoAQ['question'].str.contains('|'.join(sports) 阅读全文
摘要:
class LayerNorm(nn.Module): #层归一化 "Construct a layernorm module (See citation for details)." def __init__(self, features, eps=1e-6): super(LayerNorm, 阅读全文
摘要:
https://www.bilibili.com/video/BV1G54y1971S?from=search&seid=14148477947249263260 https://zhuanlan.zhihu.com/p/133282394 简介 Spatial-based(基于空间的) GAT(G 阅读全文
摘要:
https://www.cnblogs.com/darkknightzh/p/8297793.html 阅读全文
摘要:
pip install package -t dir 阅读全文
摘要:
https://blog.csdn.net/strivequeen/article/details/110183863 nohup python -u test.py > test.log 2>&1 & nohup 不挂起的意思 python test.py python 运行test.py文件 - 阅读全文
摘要:
https://zhuanlan.zhihu.com/p/37452654 https://blog.csdn.net/weixinhum/article/details/85064685 交叉熵和相对熵 相对熵(KL散度) KL 散度:衡量每个近似分布与真实分布之间匹配程度的方法: \[ D_{K 阅读全文
摘要:
!pwd LOG_DIR = './logs/' get_ipython().system_raw( 'fitlog log {} --ip 0.0.0.0 --port 6006 &'.format(LOG_DIR) ) Use ngrok to tunnel traffic to localho 阅读全文
摘要:
https://github.com/HarisIqbal88/PlotNeuralNet import sys sys.path.append('../') from pycore.tikzeng import * from pycore.blocks import * arch = [ to_h 阅读全文
摘要:
https://github.com/reiinakano/scikit-plot 文档:https://scikit-plot.readthedocs.io/en/stable/metrics.html # The usual train-test split mumbo-jumbo from s 阅读全文
摘要:
#include<cmath> #include<cstdio> #include<vector> #include<queue> #include<cstring> #include<iomanip> #include<stdlib.h> #include<iostream> #include<a 阅读全文
摘要:
笔记 视频 集成学习--Bagging、Boosting、Stacking、Blending Bagging Stacking Boosting 例子,C1先训练,C2训练C1分错的(后面分类器训练前面分类器分错的),C3训练C1,C2不同的。 第一步:初始化训练数据的权重,w1=w2=...=wn 阅读全文
摘要:
import numpy as np >>> a = np.array([11, 22, 33, 4, 5, 6, 7, 8, 9]) >>> b = np.array([11,22,33]) >>> c = np.setdiff1d(a,b) >>> c array([4, 5, 6, 7, 8, 阅读全文
摘要:
47分钟 同时既是Encoder,也是Decoder,也是Seq2Seq(Encoder+Decoder) https://zhuanlan.zhihu.com/p/114746463 阅读全文