上一页 1 2 3 4 5 6 7 ··· 26 下一页
摘要: ![PyTorch实现断点继续训练](https://mp.weixin.qq.com/s?__biz=MzI5MDUyMDIxNA==&mid=2247556102&idx=3&sn=5977564462ff8c0db99ea044bc4dd3d4&chksm=ec1cf1ffdb6b78e95a8dec57e001c1db091cba7ec95fb5da27a3fb98f4c857297293 阅读全文
posted @ 2021-05-14 22:21 douzujun 阅读(409) 评论(0) 推荐(0) 编辑
摘要: Demo1 TfidfTransformer + CountVectorizer = TfidfVectorizer from sklearn.feature_extraction.text import TfidfVectorizer, TfidfTransformer corpus = [ 'T 阅读全文
posted @ 2021-05-13 16:51 douzujun 阅读(710) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2021-05-10 21:23 douzujun 阅读(438) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2021-05-06 16:02 douzujun 阅读(4161) 评论(0) 推荐(0) 编辑
摘要: 数据增强 自监督 GAN,VAE 对抗训练 https://zhuanlan.zhihu.com/p/91269728 (这个非常好!!!) 二阶段训练 迁移学习 其他 layerNorm可能有用 阅读全文
posted @ 2021-04-19 21:49 douzujun 阅读(191) 评论(0) 推荐(0) 编辑
摘要: https://segmentfault.com/a/1190000037592155 阅读全文
posted @ 2021-04-15 17:47 douzujun 阅读(646) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2021-04-14 22:41 douzujun 阅读(68) 评论(0) 推荐(0) 编辑
摘要: 超级有用! 从上图的方程可以看出: 1、loss大则梯度更新量也大; 2、不同任务的loss差异大导致模型更新不平衡的本质原因在于梯度大小; 3、通过调整不同任务的loss权重wi可以改善这个问题; 4、直接对不同任务的梯度进行处理也可以改善这个问题; 所以,后续的方法大体分为两类: 1、在权重wi 阅读全文
posted @ 2021-04-08 17:35 douzujun 阅读(2307) 评论(0) 推荐(1) 编辑
摘要: https://github.com/hujinsen/pytorch_VAE_CVAE/blob/master/CVAE.ipynb 阅读全文
posted @ 2021-04-07 16:52 douzujun 阅读(690) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2021-03-27 11:11 douzujun 阅读(266) 评论(0) 推荐(0) 编辑
摘要: 超好懂,宏观:https://www.sohu.com/a/342634291_651893 https://blog.csdn.net/weixin_43476533/article/details/105750702 https://zhuanlan.zhihu.com/p/138686535 阅读全文
posted @ 2021-03-11 23:15 douzujun 阅读(112) 评论(0) 推荐(0) 编辑
摘要: 摘要 图结构数据上进行半监督学习的可拓展方法。该方法基于 直接在图上操作的卷积神经网络 的有效变体。 通过 谱图卷积的局部一阶近似 来激励我们选择 卷积结构。我们的模型在 图边 上的数量(number of graph edges)上线性缩放,并且学习隐藏层表示(其encode 局部图结构 和 结点 阅读全文
posted @ 2021-03-08 22:34 douzujun 阅读(943) 评论(0) 推荐(0) 编辑
摘要: 客户端:(发送数据) import socket import json import time class Client(object): def __init__(self): self.serverIp = '' self.serverPort = 9991 self.bufferSize = 阅读全文
posted @ 2021-02-17 20:33 douzujun 阅读(5700) 评论(0) 推荐(0) 编辑
摘要: # 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 阅读全文
posted @ 2021-02-05 00:09 douzujun 阅读(151) 评论(0) 推荐(0) 编辑
摘要: sports = ['跑步', '打球', '打', '强', '壮', '体育', '运动员', '运动', '活动', '训练', '得分', '比赛', '参赛', '赢', '球'] found = NoAQ['question'].str.contains('|'.join(sports) 阅读全文
posted @ 2021-02-05 00:08 douzujun 阅读(204) 评论(0) 推荐(0) 编辑
摘要: class LayerNorm(nn.Module): #层归一化 "Construct a layernorm module (See citation for details)." def __init__(self, features, eps=1e-6): super(LayerNorm, 阅读全文
posted @ 2021-01-27 16:49 douzujun 阅读(1242) 评论(0) 推荐(0) 编辑
摘要: https://www.bilibili.com/video/BV1G54y1971S?from=search&seid=14148477947249263260 https://zhuanlan.zhihu.com/p/133282394 简介 Spatial-based(基于空间的) GAT(G 阅读全文
posted @ 2021-01-19 10:57 douzujun 阅读(592) 评论(0) 推荐(0) 编辑
摘要: https://www.cnblogs.com/darkknightzh/p/8297793.html 阅读全文
posted @ 2020-12-09 17:07 douzujun 阅读(416) 评论(0) 推荐(0) 编辑
摘要: pip install package -t dir 阅读全文
posted @ 2020-12-02 19:32 douzujun 阅读(448) 评论(0) 推荐(0) 编辑
摘要: https://blog.csdn.net/strivequeen/article/details/110183863 nohup python -u test.py > test.log 2>&1 & nohup 不挂起的意思 python test.py python 运行test.py文件 - 阅读全文
posted @ 2020-11-28 22:00 douzujun 阅读(983) 评论(0) 推荐(0) 编辑
摘要: https://zhuanlan.zhihu.com/p/37452654 https://blog.csdn.net/weixinhum/article/details/85064685 交叉熵和相对熵 相对熵(KL散度) KL 散度:衡量每个近似分布与真实分布之间匹配程度的方法: \[ D_{K 阅读全文
posted @ 2020-11-26 22:27 douzujun 阅读(419) 评论(0) 推荐(0) 编辑
摘要: !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 阅读全文
posted @ 2020-11-22 22:14 douzujun 阅读(206) 评论(0) 推荐(0) 编辑
摘要: https://github.com/HarisIqbal88/PlotNeuralNet import sys sys.path.append('../') from pycore.tikzeng import * from pycore.blocks import * arch = [ to_h 阅读全文
posted @ 2020-11-22 15:01 douzujun 阅读(478) 评论(0) 推荐(0) 编辑
摘要: https://github.com/reiinakano/scikit-plot 文档:https://scikit-plot.readthedocs.io/en/stable/metrics.html # The usual train-test split mumbo-jumbo from s 阅读全文
posted @ 2020-11-22 14:41 douzujun 阅读(297) 评论(0) 推荐(0) 编辑
摘要: #include<cmath> #include<cstdio> #include<vector> #include<queue> #include<cstring> #include<iomanip> #include<stdlib.h> #include<iostream> #include<a 阅读全文
posted @ 2020-11-14 19:29 douzujun 阅读(324) 评论(0) 推荐(0) 编辑
摘要: 笔记 视频 集成学习--Bagging、Boosting、Stacking、Blending Bagging Stacking Boosting 例子,C1先训练,C2训练C1分错的(后面分类器训练前面分类器分错的),C3训练C1,C2不同的。 第一步:初始化训练数据的权重,w1=w2=...=wn 阅读全文
posted @ 2020-11-13 20:50 douzujun 阅读(226) 评论(0) 推荐(0) 编辑
摘要: 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, 阅读全文
posted @ 2020-11-11 16:13 douzujun 阅读(2725) 评论(0) 推荐(0) 编辑
摘要: 47分钟 同时既是Encoder,也是Decoder,也是Seq2Seq(Encoder+Decoder) https://zhuanlan.zhihu.com/p/114746463 阅读全文
posted @ 2020-11-09 16:13 douzujun 阅读(559) 评论(0) 推荐(0) 编辑
摘要: # # @lc app=leetcode.cn id=70 lang=python3 # # [70] 爬楼梯 # # @lc code=start class Solution: def climbStairs(self, n: int) -> int: if n == 1: return 1 i 阅读全文
posted @ 2020-11-06 12:30 douzujun 阅读(100) 评论(0) 推荐(0) 编辑
摘要: 注意,Python初始化一个二维数组 不能用 [[0] * col] * row,这样每行创建的是 [0]*col的引用!!!!!! 使用 [[0] * col for _ in range(row)] 阅读全文
posted @ 2020-11-06 11:18 douzujun 阅读(512) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 26 下一页