Comments (4)
我看GATNE的作者也是用TruncatedNormalInitializer初始化的呢.
from pgl.
我看GATNE的作者也是用TruncatedNormalInitializer初始化的呢.
我的意思是,create_parameter这个api的初始化变量应该是default_initializer,不是attr
应该是就是这样
trans_weights = fl.create_parameter(
shape=[
self.edge_type_count, self.embedding_u_size,
self.embedding_size // self.att_head
],
**default_initializer**=fluid.initializer.TruncatedNormalInitializer(
loc=0.0, scale=1.0 / math.sqrt(self.embedding_size)),
dtype='float32',
name='trans_w')
要不然就报错
TypeError: The type of 'attr' in create_parameter must be (<class 'NoneType'>, <class 'paddle.fluid.param_attr.ParamAttr'>), but received <class 'paddle.fluid.initializer.TruncatedNormalInitializer'>.
attr 输入的应该是属性对象ParamAttr
default_initializer 输入的才是fluid.initializer
from pgl.
噢噢, 感谢提醒. 我修改一下.
from pgl.
也可以把初始化封装成属性对象,就可以用attr变量传参了
import paddle.fluid as fluid
import math
import paddle.fluid.layers as layers
W = layers.create_parameter(shape=[784, 200], dtype='float32',attr=fluid.ParamAttr(initializer=fluid.initializer.MSRAInitializer(uniform=False)))
from pgl.
Related Issues (20)
- Graph4Rec mpirun方式 多机CPU 分布式 启动失败 HOT 5
- where is the metapath_randomwalk module?
- 在paddlepaddle 2.4.0上跑readme的例子就会出错 HOT 3
- 我的环境安装了GPU 但是我想设置PGL训练的时候不用GPU,请问该如何设置
- metapath2vec的几个问题 HOT 1
- Graph4Rec使用GPU训练报错
- Distributed GraphSAGE with the distributed graph engine HOT 1
- AttributeError: module 'paddle.fluid.libpaddle.eager.ops' has no attribute 'unique_with_counts' HOT 3
- import error HOT 5
- 'paddle.fluid.libpaddle' has no attribute 'GraphPyServer' 报错
- V100使用PGLBox时候遇到不支持的问题
- mac os13.3.1系统 m2芯片安装报错问题 HOT 4
- [PGLBox] set_node_iter_from_graph method of GraphGpuWrapper. Where does it come from?
- [PGLbox] how is data sampled? HOT 6
- 问题:graphsage 使用dataloader运行到最后一个batch卡死(batchsize=128),我看数据最后一个batch剩下1个node;另外dataloader 射者work=1也是卡死,无法结束? HOT 1
- PGLBox的镜像可以有ubuntu的版本吗 HOT 1
- 官方文档能否提供中文版本
- PGL如何在arm架构下安装 HOT 2
- PGL在aistudio进行import时报错 HOT 3
- 请问有将网页源码构建为图来训练的参考项目么?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pgl.