基本神经网络
文章平均质量分 64
有梦想的鱼
各位大佬,卷轻点,混口饭吃
展开
-
pycharm创建虚拟环境(傻瓜式、超简单)
pycharm创建torch-gpu虚拟环境(手动、requirements.txt、requirements.yml)原创 2022-05-17 12:08:31 · 7656 阅读 · 1 评论 -
GNN、GCN、GAT关系
图神经网络 Graph Neural Network (GNN)参考文献:图神经网络 Graph Neural Network (GNN)最早期的图神经网络 Graph Neural Network,简称 GNN。GNN 2009 年已经出现了,发表在论文《The graph neural network model》中。...转载 2021-11-16 15:23:24 · 9985 阅读 · 0 评论 -
cannot import name ‘ssl‘ from ‘urllib3.util.ssl_‘
今天遇到cannot import name 'ssl' from 'urllib3.util.ssl_' 这个bug,经过检查,这个bug由于代码import gensim引起的https://stackoverflow.com/questions/58544638/importerror-cannot-import-name-ssl-from-urllib3-util-ssl这个网页提出降版本的方法,我试了一下,这个方法是可行的,但是python不能随便降版本,容易捡了芝麻,丢了西瓜。ht原创 2021-08-05 01:04:01 · 7265 阅读 · 1 评论 -
attention终极版本multhead-self-attention,代码实现(直接复制粘贴,可以直接运行)
mult-self-attention终于实现了,下面附上可以直接运行的代码。# 构造mutil head attention层class MutilHeadAttention(tf.keras.layers.Layer): def __init__(self, d_model, num_heads): super(MutilHeadAttention, self).__init__() self.num_heads = num_heads s原创 2020-11-16 16:13:56 · 1292 阅读 · 0 评论 -
下面是对一篇博客的代码的改进,下面用到了lstm+attention进行文本分类
#coding=utf-8import tensorflow as tffrom tensorflow.contrib import learnimport numpy as npfrom tensorflow.python.ops.rnn import static_rnnfrom tensorflow.python.ops.rnn_cell_impl import BasicLSTMCell# 数据positive_texts = [ "我 今天 很 高兴", "我 很.转载 2020-11-13 01:11:10 · 424 阅读 · 0 评论