就和今天说早安


  • 首页

  • 分类

  • 关于

  • 归档

  • 标签

  • 公益404

  • 搜索

注意力机制

发表于 2019-08-01 | 更新于 2019-11-06 | 阅读次数
字数统计 473 字 | 阅读时长 2 分钟

##
软注意力是只注意的每项都可以是概率值,不一定是有或者无

Graph Attention Network 图注意力网络 (一) 训练运行与代码概览

Transformer中的Multi-Head Attention

关联性图注意力网络:Relational Graph Attention Networks(ICLR2019)

Graph Attention Networks网络结构+代码

翻译中的注意力机制

注意力机制的BahdanauAttention模型就很令人费解了,困惑的关键在于其中的算法。算法的计算部分只有两行代码,代码本身都知道是在做什么,但完全不明白组合在一起是什么功能以及为什么这样做。其实阅读由数学公式推导、转换而来的程序代码都有这种感觉。所以现在很多的知识保护,根本不在于源代码,而在于公式本身。没有公式,很多源代码非常难以读懂。
TensorFlow从1到2(十)带注意力机制的神经网络机器翻译

总结

他们只说注意力机制(Attention Mechanism)不练,还是我来给大家撸代码讲解

注意力能提高模型可解释性?实验表明:并没有

可视化

Visualizing attention activation in Tensorflow

文本单词,网页上可视化

matplotlib 文本attention矩阵可视化

论文中注意力机制可视化图的制作seaborn提供的热力图来制作

https://github.com/uhauha2929/examples/blob/master/self-attention.ipynb

可视化循环神经网络的注意力机制

请问注意力机制中生成的类似热力图或者柱状图是如何生成的 其实没啥用

各种各样的注意力

深度学习中的注意力机制 原理 及 代码

神经网络中的注意力机制总结及PyTorch实战

注意力公式

神经网络中注意力机制概述 摘自《Notes on Deep Learning for NLP》

层级注意力:Text Classification, Part 3 - Hierarchical attention network

tensorflow 函数

发表于 2019-07-22 | 更新于 2020-04-17 | 阅读次数
字数统计 2,615 字 | 阅读时长 11 分钟

tf.slice

slice(
input_,
begin,
size,
name=None
)

从张量中提取切片.

此操作从由begin指定位置开始的张量input中提取一个尺寸size的切片.切片size被表示为张量形状,其中size[i]是你想要分割的input的第i维的元素的数量.切片的起始位置(begin)表示为每个input维度的偏移量.换句话说,begin[i]是你想从中分割出来的input的“第i个维度”的偏移量.
begin是基于零的
···
t = tf.constant([[[1, 1, 1], [2, 2, 2]],
[[3, 3, 3], [4, 4, 4]],
[[5, 5, 5], [6, 6, 6]]])
tf.slice(t, [1, 0, 0], [1, 1, 3]) # [[[3, 3, 3]]]
tf.slice(t, [1, 0, 0], [1, 2, 3]) # [[[3, 3, 3],

#   [4, 4, 4]]]

tf.slice(t, [1, 0, 0], [2, 1, 3]) # [[[3, 3, 3]],

#  [[5, 5, 5]]]

···

shape可以理解为一个数组的维度。[5,5]就是个2维数组,第一维有5个值,第二维有5个值。[5, 5, 1, 32]就是个4维数组,第一维有5个值,第二维有5个值,第三维有1个值,第四维有32个值。数组维度可以理解为[],最外层有5个[],每个[]里还有5个[],以此类推

shape 表示是输出张量的形状 [5,5]应该是大小55的矩阵 [5,5,1,32]这个在卷积网络里应该是卷积核大小55,1个颜色通道,32个不同的卷积核 刚看TensorFlow,

tf.layers.dense(inut,units=k)

tf.layers.dense( input, units=k )会在内部自动生成一个权矩阵kernel和偏移项bias,各变量具体尺寸如下:对于尺寸为[m, n]的二维张量input, tf.layers.dense()会生成:尺寸为[n, k]的权矩阵kernel,和尺寸为[m, k]的偏移项bias。内部的计算过程为y=input * kernel + bias,输出值y的维度为[m, k]。

可以自己构造权重矩阵W和偏移矩阵b,利用矩阵乘法实现全连接层

matmul

两个三维矩阵的乘法怎样计算呢?我通过实验发现,tensorflow把前面的维度当成是batch,对最后两维进行普通的矩阵乘法。也就是说,最后两维之前的维度,都需要相同

tf.shape

根据shape如何变换矩阵。其实简单的想就是,

reshape(t, shape) => reshape(t, [-1]) => reshape(t, shape)

首先将矩阵t变为一维矩阵,然后再对矩阵的形式更改就可以了

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#tensor 't' is [[[1, 1, 1],
# [2, 2, 2]],
# [[3, 3, 3],
# [4, 4, 4]],
# [[5, 5, 5],
# [6, 6, 6]]]
# tensor 't' has shape [3, 2, 3]
# pass '[-1]' to flatten 't'
reshape(t, [-1]) ==> [1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6]
# -1 can also be used to infer the shape
# -1 is inferred to be 9:
reshape(t, [2, -1]) ==> [[1, 1, 1, 2, 2, 2, 3, 3, 3],
[4, 4, 4, 5, 5, 5, 6, 6, 6]]
# -1 is inferred to be 2:
reshape(t, [-1, 9]) ==> [[1, 1, 1, 2, 2, 2, 3, 3, 3],
[4, 4, 4, 5, 5, 5, 6, 6, 6]]
# -1 is inferred to be 3:
reshape(t, [ 2, -1, 3]) ==> [[[1, 1, 1],
[2, 2, 2],
[3, 3, 3]],
[[4, 4, 4],
[5, 5, 5],
[6, 6, 6]]]
---------------------
作者:lxg0807
来源:CSDN
原文:https://blog.csdn.net/lxg0807/article/details/53021859

tf.nn.nce_loss

1
2
3
4
5
6
7
loss = tf.reduce_mean(
tf.nn.nce_loss(weights=nce_weights,
biases=nce_biases,
labels=train_labels,
inputs=embed,
num_sampled=num_sampled,
num_classes=vocabulary_size))

其中,

train_inputs = tf.placeholder(tf.int32, shape=[batch_size])
train_labels = tf.placeholder(tf.int32, shape=[batch_size, 1])
embeddings = tf.Variable(
tf.random_uniform([vocabulary_size, embedding_size], -1.0, 1.0))
embed = tf.nn.embedding_lookup(embeddings, train_inputs) 

train_inputs中的就是中心词,train_label中的就是语料库中该中心词在滑动窗口内的上下文词。

所以,train_inputs中会有连续n-1(n为滑动窗口大小)个元素是相同的。即同一中心词。

tf.truncated_normal从截断的正态分布中输出随机值。#生成的值服从具有指定平均值和标准偏差的正态分布,如果生成的值大于平均值2个标准偏差的值则丢弃重新选择。#标准差就是标准偏差,是方差的算术平均根。而上面的代码中对标准方差进行了限制的原因就是为了防止神经网络的参数过大。为什么embeddings中的参数没有进行限制呢?是因为最初初始化的时候,所有的词的词向量之间要保证一定的距离。然后通过学习,才能拉近某些词的关系,使得某些词的词向量更加接近。
l #因为是单层神经网络,所以要限制参数过大。如果是深层神经网络,就不需要标准差除一一个embedding_size的平方根了。深层神经网络虽然也要进行参数的正则化限制,防止过拟合和梯度爆炸问题,但是很少看见,有直接对stddev进行限制的

embddings是词嵌入,就是要学习的词向量的存储矩阵。共有词汇表大小的行数,每一行对应一个词的向量。

在word2vec模型中,我们感兴趣的是为单词构建表示。在训练过程中,给定一个滑动窗口,每个单词将有两个嵌入:1)当单词是中心单词时; 2)当单词是上下文单词时。这两个嵌入分别称为输入和输出向量。(输入和输出矩阵的更多解释)

在我看来,输入矩阵是embeddings和输出矩阵nce_weights

该embeddings张量是最终输出矩阵。它将单词映射到向量。在单词预测图中使用它。

输入矩阵是从训练文本生成的一批centre-word : context-word(train_input和train_label分别)对。

虽然nce_lossop 的确切工作方式还不为我所知,但基本思想是它使用单层网络(参数nce_weights和nce_biases)将输入向量(从embeddings使用embedop中选择)映射到输出字,然后比较输出到训练标签(训练文本中的相邻单词),也输出到词汇中num_sampled所有其他单词的随机子样本(),然后修改输入向量(存储在其中embeddings)和网络参数以最小化错误。

参考文献:理解tensorflow中的`tf.nn.nce_loss()

What is the purpose of weights and biases in tensorflow word2vec example

关于word2vec的skip-gram模型使用负例采样nce_loss损失函数的源码剖析

关于采样编号的问题 编号越大,词频越小

word2vec官网说明
Understanding tf.nn.nce_loss() in tensorflow

求通俗易懂解释下nce loss?

from tensorflow.contrib import learn

vp = learn.preprocessing.VocabularyProcessor(100, 0, tokenizer_fn=chinese_tokenizer)

其中VocabularyProcessor(max_document_length,min_frequency=0,vocabulary=None, tokenizer_fn=None)的构造函数中有4个参数
max_document_length是文档的最大长度。如果文本的长度大于最大长度,那么它会被剪切,反之则用0填充
min_frequency词频的最小值,出现次数>最小词频 的词才会被收录到词表中
vocabulary CategoricalVocabulary 对象,不太清楚使用方法
tokenizer_fn tokenizer function,讲句子或给定文本格式 token化得函数,可以理解为分词函数

链接: https://www.jianshu.com/p/db400a569730
。

维度广播

tf.expand_dims()

tf.squeeze

tf.squeeze(input, axis=None, name=None, squeeze_dims=None)

从tensor中去除形状为1的维。(为了去除多余的维)

tf.concat()

tf.concat(values, axis, name=’concat’)

Concatenates tensors along one dimension.

沿着某维串接tensors。和pandas包的concat方法差不多

例如,有tensor1 “t1”形状为[2,3],tensor2 “t2”形状为[2,3],则

tf.concat([t1,t2],0)的形状为[4,3],tf.concat([t1,t2],1)的形状为[2,6]

tensorflow 部分预处理函数

tf.trainable_variables(), tf.all_variables(), tf.global_variables()

tf.trainable_variables()

顾名思义,这个函数可以也仅可以查看可训练的变量,在我们生成变量时,无论是使用tf.Variable()还是tf.get_variable()生成变量,都会涉及一个参数trainable,其默认为True。

Tensorflow小技巧整理:tf.trainable_variables(), tf.all_variables(), tf.global_variables()的使用

tf.Variable、tf.get_variable、tf.variable_scope以及tf.name_scope关系

tf.layers.Flatten

展平向量,把一个Tensor 展平

tensorflow官方文档

https://docs.pythontab.com/tensorflow/tutorials/word2vec/

tensorflow性能调优实践

tensorflow里,首字母大写的类,首字母小写的才是op。
tf.constant()是直接定义在graph里的,它是graph的一部分,会随着graph一起加载。如果通过tf.constant()定义了一个维度很高的张量,那么graph占用的内存就会变大,加载也会变慢。而tf.placeholder就没有这个问题,所以如果数据维度很高的话,定义成tf.placeholder是更好的选择

https://www.jianshu.com/p/937a0ce99f56

TensorFlow学习笔记1:graph、session和op

tensorflow 可视化

file_writer = tf.summary.FileWriter(‘/path/to/logs’, sess.graph)

TensorBoard的graph有两种依赖,数据依赖和控制依赖。数据依赖展示了tensors在两个ops之间的流动以及流动方向;控制依赖运用了虚线来表示。TensorBoard显示graph有两个区域,主区域和辅助区域,为了便于观察我们可以把一些高层次的依赖项多的节点从主区域移出到辅助区域,只需要在节点右键点击Remove from main graph即可.

1.创建一个TensorFlow graph,用summary operations来保存我们需要了解的节点的信息。
2.我们需要整合所有节点的信息,如果一个一个提取太耗费精力和时间,我们可以选择tf.summary.merge_all()函数来把所有的op节点整合成一个单一节点,然后通过运行该节点来提取出所有summary op的信息。
3.用tf.summary.FileWriter()函数把提取出的所有的summary op信息存入磁盘中。我们同时可以用该函数把graph的信息存入磁盘,用来可视化神经网络的结构。
4.在训练过程中用add_summary命令把训练信息存入磁盘,训练结束后记得把FileWriter对象close。

打开终端,键入以下命令运行TensorBoard:

tensorboard –logdir=path/to/logs

得到提示信息“Starting TensorBoard…”则运行成功,我们可以打开浏览器,在地址栏输入localhost:6006进入TensorBoard的操作面板。

参考:TensorBoard可视化

官网

HowTo profile TensorFlow

tensorflow 了解

这是我看过解释TensorFlow最透彻的文章!

:池化层(pooling)和全连接层(dense)

tensorflow 1.0 学习:池化层(pooling)和全连接层(dense)

深度学习库 TensorFlow (TF) 中的候选采样

如果类别服从均匀分布,我们就用uniform_candidate_sampler;如果词作类别,我们知道词服从 Zipfian, 我们就用 log_uniform_candidate_sampler; 如果我们能够通过统计或者其他渠道知道类别满足某些分布,我们就用 nn.fixed_unigram_candidate_sampler; 如果我们实在不知道类别分布,我们还可以用 tf.nn.learned_unigram_candidate_sampler。

深度学习库 TensorFlow (TF) 中的候选采样

概率图模型

发表于 2019-06-24 | 更新于 2019-08-13 | 阅读次数
字数统计 411 字 | 阅读时长 2 分钟

概率图模型(PGM/probabilistic graphical model)是一种用于学习这些带有依赖(dependency)的模型的强大框架。

在探讨如何将概率图模型用于机器学习问题之前,我们需要先理解 PGM 框架。概率图模型(或简称图模型)在形式上是由图结构组成的。图的每个节点(node)都关联了一个随机变量,而图的边(edge)则被用于编码这些随机变量之间的关系。

在这个图中,每个结点表示一个变量,每个箭头表示一个条件概率,起点是条件概率中的条件,终点是该随机变量。比如,从a指向b的箭头表示p(b|a),并称a是b的父结点
参考文献:https://blog.csdn.net/isMarvellous/article/details/78828566

机器学习 —— 概率图模型(推理:采样算法)

采样

MCMC等采样算法

动态主题模型

动态主题模型Dynamic Topic Models, DTM
基于gibbs采样的topic over time
基于K-means的动态主题模型话题分类

pyLDA系列︱考量时间因素的动态主题模型(Dynamic Topic Models)

LDA 变形

senLDA实践—长短文本相似度 代码

Personal PageRank

基于图的推荐算法之Personal PageRank代码实战
个性化的PageRank和主题感知的PageRank

如何优雅的理解PageRank
双向随机游走(个性化PageRank )

twitter

概率图大牛

唐杰 http://keg.cs.tsinghua.edu.cn/jietang/#research

梁上松:http://sdcs.sysu.edu.cn/content/4569

受限波尔兹曼机(RBM)

受限玻尔兹曼机(RBM)与其在Tensorflow的实现
RBM算法模型应用在推荐系统 Python代码实现

tensorflow代码总结

发表于 2019-06-20 | 更新于 2019-08-03 | 分类于 代码 | 阅读次数
字数统计 488 字 | 阅读时长 3 分钟

数据不平衡

pip install tf-nightly-gpu-2.0-preview

首先我们需要统计每种类别包含的样本数量,并基于此计算类别权重:

计算每种类别数据的数量

counts = np.bincount(train_targets[:, 0])

基于数量计算类别权重

1
2
3
4
5
6
7
8
9
10
11
12
13
weight_for_0 = 1. / counts[0]
weight_for_1 = 1. / counts[1]
class_weight = {0: weight_for_0, 1: weight_for_1}
在训练时,加上一行代码设置类别权重即可:
model.fit(train_features, train_targets,
batch_size=2048,
epochs=50,
verbose=2,
callbacks=callbacks,
validation_data=(val_features, val_targets),
# 设置类别权重
class_weight=class_weight)

完整代码:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# -*- coding: utf-8 -*-
"""## First, vectorize the CSV data"""
import csv
import numpy as np
# Get the real data from https://www.kaggle.com/mlg-ulb/creditcardfraud/downloads/creditcardfraud.zip/
fname = '/Users/fchollet/Downloads/creditcard.csv'
all_features = []
all_targets = []
with open(fname) as f:
for i, line in enumerate(f):
if i == 0:
print('HEADER:', line.strip())
continue # Skip header
fields = line.strip().split(',')
all_features.append([float(v.replace('"', '')) for v in fields[:-1]])
all_targets.append([int(fields[-1].replace('"', ''))])
if i == 1:
print('EXAMPLE FEATURES:', all_features[-1])
features = np.array(all_features, dtype='float32')
targets = np.array(all_targets, dtype='uint8')
print('features.shape:', features.shape)
print('targets.shape:', targets.shape)
"""## Prepare a validation set"""
num_val_samples = int(len(features) * 0.2)
train_features = features[:-num_val_samples]
train_targets = targets[:-num_val_samples]
val_features = features[-num_val_samples:]
val_targets = targets[-num_val_samples:]
print('Number of training samples:', len(train_features))
print('Number of validation samples:', len(val_features))
"""## Analyze class imbalance in the targets"""
counts = np.bincount(train_targets[:, 0])
print('Number of positive samples in training data: {} ({:.2f}% of total)'.format(counts[1],
100 * float(counts[1]) / len(
train_targets)))
weight_for_0 = 1. / counts[0]
weight_for_1 = 1. / counts[1]
"""## Normalize the data using training set statistics"""
mean = np.mean(train_features, axis=0)
train_features -= mean
val_features -= mean
std = np.std(train_features, axis=0)
train_features /= std
val_features /= std
from tensorflow import keras
model = keras.Sequential([
keras.layers.Dense(256, activation='relu',
input_shape=(train_features.shape[-1],)),
keras.layers.Dense(256, activation='relu'),
keras.layers.Dropout(0.3),
keras.layers.Dense(256, activation='relu'),
keras.layers.Dropout(0.3),
keras.layers.Dense(1, activation='sigmoid'),
])
model.summary()
metrics = [keras.metrics.FalseNegatives(name='fn'),
keras.metrics.FalsePositives(name='fp'),
keras.metrics.TrueNegatives(name='tn'),
keras.metrics.TruePositives(name='tp'),
keras.metrics.Precision(name='precision'),
keras.metrics.Recall(name='recall')]
model.compile(optimizer=keras.optimizers.Adam(1e-2),
loss='binary_crossentropy',
metrics=metrics)
callbacks = [keras.callbacks.ModelCheckpoint('fraud_model_at_epoch_{epoch}.h5')]
class_weight = {0: weight_for_0, 1: weight_for_1}
model.fit(train_features, train_targets,
batch_size=2048,
epochs=50,
verbose=2,
callbacks=callbacks,
validation_data=(val_features, val_targets),
class_weight=class_weight)

参考:https://mp.weixin.qq.com/s/K9U3GCW1tAIYRoKKq_nG9w
代码地址:
https://colab.research.google.com/drive/1xL2jSdY-MGlN60gGuSH_L30P7kxxwUfM

如何解决机器学习中数据不平衡问题

卷积网络

发表于 2019-05-13 | 更新于 2019-08-01 | 阅读次数
字数统计 8 字 | 阅读时长 1 分钟

卷积就是加权求和

社交网络论文总结

发表于 2019-05-11 | 更新于 2019-08-09 | 阅读次数
字数统计 599 字 | 阅读时长 2 分钟

Understanding the Facets of Homophily in Social Psycho-Sociological Network Communities

这篇论文研究朋友,亲属,同事之间的同质性:

人工标注了关系类型

建立了四个模型预测年龄,性别,人格,values

最后还进行了链接预测和社区发现的比较,比较这三个不同群体中引入人格特征后社区发现的准确度

Tanmoy Chakraborty 主页:http://faculty.iiitd.ac.in/~tanmoy/index.html#home

Metadata vs. Ground-truth: A Myth behind the Evolution of Community Detection Methods

基于不同属性建立的社区与基于社区发现的社区进行比较,分析每种社区发现算法在链接预测,信息传播,病毒感染之间的区别

代码库:

snap:https://github.com/snap-stanford/snap

图神经网络

图网络主要解决的是AI对结构化数据的处理,而在动态数据、大规模数据、非结构化数据等领域,图网络的作为依旧有限

影响力

distinguish the effect of peer influence and group conformity.

Confluence: Conformity Influence in Large Social Networks

从众效应
群体,个人,同伴

根据历史行为预测下一行为

Social Influence Analysis in Large-scale Networks

在不同主题下的社会影响力
Topical Affinity Propagation (TAP)

应用于专家发现
相似的节点,哪一个节点对另一个节点有较强的影响

##Mining Topic-level Influence in Heterogeneous Networks

##Topic-Level Opinion Influence Model (TOIM): An Investigation Using Tencent Microblogging

问题

网络表示的作用
聚类的作用

GraphSAGE

Weisfeiler-Lehman Isomorphism Test(图同构算法)
对于不带标签的图,初始的时候,两个图的全部节点赋值1(或以度为标签),然后做多轮wl,出现节点ID和各ID出现次数不一致的情况就认为不是Isomorphism

图注意力网络

通俗易懂!使用Excel和TF实现Transformer
https://mp.weixin.qq.com/s/3_dK289DPREI0KNj0NaR-A

社区发现

社团发现算法分类及简介

igraph networkX

networkX 官方文档

read json graph networkx file

Method to save networkx graph to json graph?

软件:Network Analysis using iGraph Python Library

lookalike

互联网中寻找相似实体(lookalike)算法优化方案使用比较广泛过的解决方案是结合Minhash和局部敏感哈希算法 LSH (Local-Sensitive-Hash)的特性,分别减少特征比较和两两用户/item(Pair to Pair)的比较

百度百科标签提取:深度丨从零搭建推荐体系:概述及标签体系搭建(上)

网络表示学习论文

发表于 2019-05-06 | 更新于 2019-08-01 | 阅读次数
字数统计 79 字 | 阅读时长 1 分钟

transNET:

边的关系是两个合作者摘要的关键词

研究目的:为什么相互关注

兴趣节点:
位置节点:
内容节点:内容风格
出行方式
来源
内容主题

工作量,总结,突出问题
数据集大小
对比实验
参考文献(新)
格式

igraph 安装

发表于 2019-04-25 | 更新于 2019-04-26 | 阅读次数
字数统计 115 字 | 阅读时长 1 分钟

windows 安装

在非官官方库
找到对应的python-igraph

pip install python_igraph-0.7.1.post6-cp36-none-win_amd64.whl

python-igraph在绘图的时候依赖pycairo模块

linux

pip3 install python_igraph 下载到了user/.local/python3.5,原因未知

失败方式:
sudo add-apt-repository ppa:igraph/ppa
sudo apt-get update # update your package database
sudo apt-get install python-igraph

pycairo

pip install pycairo -i https://pypi.tuna.tsinghua.edu.cn/simple

sudo pip install cairocffi -i https://pypi.tuna.tsinghua.edu.cn/simple

查找

whereis
dpkg -L python-igraph
pip3 show python-igraph

tensorflow1.11 + cuda 9.0+ cudnn 7.0

发表于 2019-04-25 | 更新于 2019-08-09 | 阅读次数
字数统计 310 字 | 阅读时长 2 分钟

要查看tensorflow 与cuda版本的对应关系

查看cuda版本

cat /usr/local/cuda/version.txt

cat /usr/local/cuda/include/cudnn.h | grep CUDNN_MAJOR -A 2

nvcc -V

下载cuda,cudnn

cudnn
需要登陆下载 library 版本

cuda网址,下载runfil(local)版本

安装

cuda

sudo chmod +x cuda_9.0.176_384.81_linux.run # 为 cuda_9.0.176_384.81_linux.run 添加可执行权限

./cuda_9.0.176_384.81_linux.run # 安装 cuda_9.0.176_384.81_linux.run

Install NVIDIA Accelerated Graphics Driver for Linux-x86_64 384.81?
(y)es/(n)o/(q)uit: n # 如果已经安装过了,则不需要安装显卡驱动

cudnn

1
2
3
4
5
6
7
sudo tar -xzvf cudnn-8.0-linux-x64-v5.1.tgz
sudo cp cuda/include/cudnn.h /usr/local/cuda/include
sudo cp cuda/lib64/libcudnn* /usr/local/cuda/lib64
sudo chmod a+r /usr/local/cuda/include/cudnn.h /usr/local/cuda/lib64/libcudnn*

sudo vim ~/.bashrc
export PATH=/usr/local/cuda/bin${PATH:+:${PATH}} export LD_LIBRARY_PATH=/usr/local/cuda/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} export CUDA_HOME=/usr/local/cuda
source ~/.bashrc 使之生效

安装tensorflow

conda create -n name python=3.6
pip install tensorflow-gpu==1.11 -i https://pypi.tuna.tsinghua.edu.cn/simple

参考:https://blog.csdn.net/uhauha2929/article/details/83448909

https://www.cnblogs.com/jins-note/p/9598178.html
tensorflow指定版本的安装及升级到最新版:https://blog.csdn.net/leitouguan8655/article/details/82897525

基于NVIDIA GeForce MX150 的Windows10安装TensorFlow-GPU详解

win10下CUDA和CUDNN的安装(超详细)!亲测有效

tensorflow各个版本的CUDA以及Cudnn版本对应关系

论文写作

发表于 2019-03-22 | 更新于 2019-08-20 | 阅读次数
字数统计 578 字 | 阅读时长 3 分钟

时态,单复数一致性,定冠词

摘要,实验用一般现在时

相关工作用过去式

Introduction

Some conventional community detection methods may have limited performance because
they merely focus on the networks’ topological structure

In order to compensate for the possible deficiencies of

apply
perform operates by
utilizing
For instance,
Moreover
Additionally
indicates
such assumption is not sufficient
Especially
More importantly,
Furthermore
In fact,
in particular
illustrate
demonstrate
wherereas
Since
In the meanwhile
hence
thus
respectively

Extensive expeperience conducted on a large dataset

motive

The concept of emotional intelligence (EI) has drawn a great amount of scholarly interest in recent years; however, attempts to measure individual differences in this ability remain controversial.

There is less research on the EI ability of Jordanian nurses, and the present study was undertaken to address this gap

介绍结构

The paper is structured as follows. In Sect.2we discuss the basic conceptsof information-theoretic bounded rationality, sampled-based interpretations ofbounded rationality in the context of Markov Chain Monte Carlo (MCMC),and the basic concepts of Variational Autoencoders. In Sect.3. we present theproposed decision-making model by combining sample-based decision-makingwith concurrent learning of priors parameterized by Variational Autoencoders.In Sect.4we evaluate the model with toy examples. In Sect.5we discuss ourresults.

贡献

Understanding the structure and analyzing properties of graphs are hence paramount to developing insights into the physical systems.

##方法

公式

, the expectation
the solution of s is given by the following set of equations
where A j = A ji = 1 when there is an edge between node i and j , and otherwise =0
where Xir
is defined as the propensity that node i belongs to community r.
utilizes
represents
Therefore, we can formulate another objective function as
X corresponds to the topological structure
We denote a density on X by p(X),

实验

Based on the models derived above, in this section, we introduce a simplified unified model that integrates topology as well
as content to conduct a pre-experiment about the mismatch effect

we designed the
following pre-experiment to illustrate the different influences of
semantic information with different trade-offs between topology
and content.

In the pre-experiment, we applied the unified model (5) to two real network datasets
take the following two steps in turns.

实验结果

We observe that HOPE, LLE and SDNE achieve high MAP values. Furthermore, HOPE can predict top 5 links with perfect accuracy.

A paper showcasing the results

to demonstrate our approach we evaluate two scenarios.

Our results indicate that using

to illustrate the differences in efficiency between the single prior agent andthe multi-prior agents, we plotted in Fig.4

Furthermore our results indicate that the multi-prior system generally outperforms the single-prior system in terms of utility.

We executed above initialization

with regard to the result of Facebook in
Fig. 1(b)

reflects the fact that
we can still observe
As shown in Fig. 2, for both ASCD-ARC and ASCD-NMI methods,the values of the objective function converge fast straight from the beginning and ASCD-ARC converges faster than ASCD-NMI

which are shown in Fig. 2

总结

In this study we ‘implemented bounded rational decision makers with adap-tive priors. We achieved this with Variational Autoencoder priors.

因为

Since

并且

Accordingly
Moreover

然而

while
Nevertheless
hence
respectively

1234…11
WeiXiangYu

WeiXiangYu

胸怀猛虎 细嗅蔷薇

103 日志
30 分类
57 标签
GitHub Twitter Youtube Weibo 豆瓣 知乎 CSDN
Links
  • MacTalk
  • 爱可可爱生活
  • IT瘾
  • 苏剑林
© 2017 - 2020 WeiXiangYu
本站总访问量次 本站访客数人次
由 Hexo 强力驱动
主题 - NexT.Pisces