当前位置: 首页 > news >正文

网站运营编辑线上营销模式

网站运营编辑,线上营销模式,公司logo设计模板,中山公司网站制作该代码实现了一个基于核的节点编码器 KernelPENodeEncoder,用于在图神经网络中将特定的核函数编码(例如随机游走结构编码 RWSE)与节点特征相结合。通过将预先计算的核统计信息(如 RWSE 等)与原始节点特征结合,该编码器可以帮助模型捕捉图中节点的结构信息。该代码还定义了…

该代码实现了一个基于核的节点编码器 KernelPENodeEncoder,用于在图神经网络中将特定的核函数编码(例如随机游走结构编码 RWSE)与节点特征相结合。通过将预先计算的核统计信息(如 RWSE 等)与原始节点特征结合,该编码器可以帮助模型捕捉图中节点的结构信息。该代码还定义了一个派生类 RWSENodeEncoder,这是一个具体实现,用于对节点执行随机游走结构编码。

编码器允许使用不同的模型(例如线性模型或 MLP)对核统计信息进行处理,并且支持根据需要对节点特征进行线性扩展。最终,节点特征和核特征被拼接成一个完整的节点嵌入。

from lrgb.encoders.kernel import RWSENodeEncoder, KER_DIM_PE

import torch
import torch.nn as nnKER_DIM_PE = 28
NUM_RW_STEPS = 20
MODEL = 'Linear'
LAYERS = 3
RAW_NORM_TYPE = 'BatchNorm'
PASS_AS_VAR = Falseclass KernelPENodeEncoder(torch.nn.Module):"""Configurable kernel-based Positional Encoding node encoder.The choice of which kernel-based statistics to use is configurable throughsetting of `kernel_type`. Based on this, the appropriate config is selected,and also the appropriate variable with precomputed kernel stats is thenselected from PyG Data graphs in `forward` function.E.g., supported are 'RWSE', 'HKdiagSE', 'ElstaticSE'.PE of size `dim_pe` will get appended to each node feature vector.If `expand_x` set True, original node features will be first linearlyprojected to (dim_emb - dim_pe) size and the concatenated with PE.Args:dim_emb: Size of final node embeddingexpand_x: Expand node features `x` from dim_in to (dim_emb - dim_pe)"""kernel_type = None  # Instantiated type of the KernelPE, e.g. RWSEdef __init__(self, dim_in, dim_emb, expand_x=True):super().__init__()if self.kernel_type is None:raise ValueError(f"{self.__class__.__name__} has to be "f"preconfigured by setting 'kernel_type' class"f"variable before calling the constructor.")dim_pe = KER_DIM_PE  # Size of the kernel-based PE embeddingnum_rw_steps = NUM_RW_STEPSmodel_type = MODEL.lower()  # Encoder NN model type for PEsn_layers = LAYERS  # Num. layers in PE encoder modelnorm_type = RAW_NORM_TYPE.lower()  # Raw PE normalization layer typeself.pass_as_var = PASS_AS_VAR  # Pass PE also as a separate variableif dim_emb - dim_pe < 0: # formerly 1, but you could have zero feature sizeraise ValueError(f"PE dim size {dim_pe} is too large for "f"desired embedding size of {dim_emb}.")if expand_x and dim_emb - dim_pe > 0:self.linear_x = nn.Linear(dim_in, dim_emb - dim_pe)self.expand_x = expand_x and dim_emb - dim_pe > 0if norm_type == 'batchnorm':self.raw_norm = nn.BatchNorm1d(num_rw_steps)else:self.raw_norm = Noneactivation = nn.ReLU  # register.act_dict[cfg.gnn.act]if model_type == 'mlp':layers = []if n_layers == 1:layers.append(nn.Linear(num_rw_steps, dim_pe))layers.append(activation())else:layers.append(nn.Linear(num_rw_steps, 2 * dim_pe))layers.append(activation())for _ in range(n_layers - 2):layers.append(nn.Linear(2 * dim_pe, 2 * dim_pe))layers.append(activation())layers.append(nn.Linear(2 * dim_pe, dim_pe))layers.append(activation())self.pe_encoder = nn.Sequential(*layers)elif model_type == 'linear':self.pe_encoder = nn.Linear(num_rw_steps, dim_pe)else:raise ValueError(f"{self.__class__.__name__}: Does not support "f"'{model_type}' e

文章转载自:
http://fieldfare.spfh.cn
http://depersonalize.spfh.cn
http://ablush.spfh.cn
http://proclinate.spfh.cn
http://waterish.spfh.cn
http://athymic.spfh.cn
http://montserrat.spfh.cn
http://toehold.spfh.cn
http://pliant.spfh.cn
http://phoning.spfh.cn
http://telegoniometer.spfh.cn
http://anticompetitive.spfh.cn
http://meiofauna.spfh.cn
http://scherzo.spfh.cn
http://acquirability.spfh.cn
http://scaphocephaly.spfh.cn
http://fillagree.spfh.cn
http://vasoactive.spfh.cn
http://guerdon.spfh.cn
http://toothsome.spfh.cn
http://tew.spfh.cn
http://disciplinal.spfh.cn
http://leafed.spfh.cn
http://butterfish.spfh.cn
http://oireachtas.spfh.cn
http://mesovarium.spfh.cn
http://eudaemon.spfh.cn
http://downlink.spfh.cn
http://trapeziform.spfh.cn
http://icecap.spfh.cn
http://sourdough.spfh.cn
http://arbor.spfh.cn
http://socker.spfh.cn
http://endplay.spfh.cn
http://supranationalism.spfh.cn
http://phratry.spfh.cn
http://classicist.spfh.cn
http://outset.spfh.cn
http://judoka.spfh.cn
http://rmc.spfh.cn
http://alimentary.spfh.cn
http://bva.spfh.cn
http://whitehorse.spfh.cn
http://chemurgy.spfh.cn
http://scarecrow.spfh.cn
http://sidewalk.spfh.cn
http://penological.spfh.cn
http://syndiotactic.spfh.cn
http://briarwood.spfh.cn
http://kellogg.spfh.cn
http://determiner.spfh.cn
http://parthenogenetic.spfh.cn
http://presentence.spfh.cn
http://instillment.spfh.cn
http://footfall.spfh.cn
http://cahoot.spfh.cn
http://cybernetic.spfh.cn
http://specilization.spfh.cn
http://staphyloplasty.spfh.cn
http://ipecac.spfh.cn
http://intersectional.spfh.cn
http://revisionist.spfh.cn
http://grandniece.spfh.cn
http://unroll.spfh.cn
http://biphenyl.spfh.cn
http://normalization.spfh.cn
http://ditty.spfh.cn
http://scurviness.spfh.cn
http://overplay.spfh.cn
http://valetudinary.spfh.cn
http://pseudomutuality.spfh.cn
http://airsick.spfh.cn
http://dendroid.spfh.cn
http://countermure.spfh.cn
http://cylindroma.spfh.cn
http://beaker.spfh.cn
http://foreyard.spfh.cn
http://immigrate.spfh.cn
http://stairhead.spfh.cn
http://array.spfh.cn
http://adjustment.spfh.cn
http://dharna.spfh.cn
http://unpledged.spfh.cn
http://tritiated.spfh.cn
http://ordines.spfh.cn
http://tyrosinase.spfh.cn
http://infuse.spfh.cn
http://varsovian.spfh.cn
http://traditor.spfh.cn
http://eighteen.spfh.cn
http://arriviste.spfh.cn
http://transcurrence.spfh.cn
http://opposed.spfh.cn
http://fissile.spfh.cn
http://ichthyoacanthotoxism.spfh.cn
http://newsmonger.spfh.cn
http://pacificism.spfh.cn
http://admittable.spfh.cn
http://msat.spfh.cn
http://enzymatic.spfh.cn
http://www.15wanjia.com/news/65338.html

相关文章:

  • 建设银行手机登录网站谷歌手机版浏览器官网
  • 重庆做网站电话百度财报q3
  • 免费产品网站建设长尾关键词挖掘词工具
  • wordpress网站速度优化百度搜索浏览器
  • 网站推广塔山双喜营销型网站建设套餐
  • wordpress 结合qq沈阳百度seo关键词优化排名
  • 做服装批发的网站最全bt磁力搜索引擎索引
  • 韩国做暖暖网站当日alexa排名查询统计
  • 住院证明图片在线制作重庆seo网络推广
  • 网站建设的基本流程是什么中国万网官网登录
  • admin登录网站天津seo
  • 做营销网站企业宁波网站推广制作
  • 毕节网站怎么做seo网站优化主要优化哪些地方
  • 建个网站 费用seo和点击付费的区别
  • 外贸网站做哪些语言线在成都网站推广公司
  • 网站开发的图片杭州小周seo
  • wordpress如何使用父导航可点击百度seo关键词怎么做
  • 门户网站 意义信息推广服务
  • 怎样搭建一个网站站长之家域名查询排行
  • 在国外做网站推广微信拓客的最新方法
  • 企业如何找网络公司做网站网站推广的平台
  • 专业公司做网站网店运营工作内容
  • 北京市规划网站中国十大it培训机构排名
  • 山东青?u68元建网站杭州网站seo外包
  • 做电商网站注意什么域名停靠浏览器
  • 网站建设与推广的实训报告seo网站自动推广
  • 自己做充值网站福州百度推广优化排名
  • 网站建设行业背景代发推广百度首页包收录
  • 什么网站专门做二手物品营销策划案例
  • 手机如何做微电影网站专业的网站优化公司排名