国产亚洲精品福利在线无卡一,国产精久久一区二区三区,亚洲精品无码国模,精品久久久久久无码专区不卡

當前位置: 首頁 > news >正文

wordpress下拉篩選重慶做seo外包的

wordpress下拉篩選,重慶做seo外包的,福田皇崗社區(qū)做網(wǎng)站,成人做視頻在線觀看網(wǎng)站該代碼實現(xiàn)了一個基于核的節(jié)點編碼器 KernelPENodeEncoder,用于在圖神經(jīng)網(wǎng)絡中將特定的核函數(shù)編碼(例如隨機游走結構編碼 RWSE)與節(jié)點特征相結合。通過將預先計算的核統(tǒng)計信息(如 RWSE 等)與原始節(jié)點特征結合,該編碼器可以幫助模型捕捉圖中節(jié)點的結構信息。該代碼還定義了…

該代碼實現(xiàn)了一個基于核的節(jié)點編碼器 KernelPENodeEncoder,用于在圖神經(jīng)網(wǎng)絡中將特定的核函數(shù)編碼(例如隨機游走結構編碼 RWSE)與節(jié)點特征相結合。通過將預先計算的核統(tǒng)計信息(如 RWSE 等)與原始節(jié)點特征結合,該編碼器可以幫助模型捕捉圖中節(jié)點的結構信息。該代碼還定義了一個派生類 RWSENodeEncoder,這是一個具體實現(xiàn),用于對節(jié)點執(zhí)行隨機游走結構編碼。

編碼器允許使用不同的模型(例如線性模型或 MLP)對核統(tǒng)計信息進行處理,并且支持根據(jù)需要對節(jié)點特征進行線性擴展。最終,節(jié)點特征和核特征被拼接成一個完整的節(jié)點嵌入。

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://m.aloenet.com.cn/news/39470.html

相關文章:

  • wordpress科技主題網(wǎng)站排名優(yōu)化公司
  • seo優(yōu)化排名推廣排名優(yōu)化系統(tǒng)
  • 網(wǎng)頁設計模板網(wǎng)站推薦外包網(wǎng)絡推廣公司
  • 上海網(wǎng)站開發(fā)公司外包自學seo能找到工作嗎
  • asp網(wǎng)站制作設計教程佛山網(wǎng)站優(yōu)化軟件
  • 海南省住房和城鄉(xiāng)建設廳網(wǎng)站首頁排名前50名免費的網(wǎng)站
  • 網(wǎng)站建設 云計算搜索數(shù)據(jù)
  • wordpress企業(yè)網(wǎng)站制作鄭州seo優(yōu)化
  • 這幾年做啥網(wǎng)站致富推廣鏈接讓別人點擊
  • 門戶網(wǎng)站建設如何入賬銅陵seo
  • 美國十大購物網(wǎng)站免費注冊個人網(wǎng)站不花錢
  • 長安東莞網(wǎng)站設計百度掃一掃識別圖片在線
  • logo設計培訓寧波seo網(wǎng)絡推廣優(yōu)化價格
  • 網(wǎng)站網(wǎng)頁設計中怎么添加頁碼信息谷歌海外推廣
  • 網(wǎng)站方案策劃5118營銷大數(shù)據(jù)
  • wordpress屏蔽垃圾國外ip領碩網(wǎng)站seo優(yōu)化
  • 網(wǎng)站建設服務好公司排名google瀏覽器官網(wǎng)下載
  • 做公司網(wǎng)站計入什么會計科目seo用什么論壇引流
  • 網(wǎng)站實現(xiàn)seo基礎知識考試
  • 怎樣優(yōu)化網(wǎng)站排名靠前泰州百度關鍵詞優(yōu)化
  • 重慶市工程建設信息網(wǎng)2021優(yōu)化關鍵詞的公司
  • 哈爾濱地鐵愛建站seo查詢網(wǎng)站是什么
  • 企業(yè)網(wǎng)站優(yōu)化找哪家搜索排行
  • wordpress本地建站成人零基礎學電腦培訓班
  • 瀚欽科技網(wǎng)站建設谷歌搜索引擎免費
  • 北京建站設計寫一篇軟文1000字
  • 有沒有專門做航拍婚禮網(wǎng)站應用下載app排行榜
  • wordpress動漫博客模板東莞seo靠譜
  • 網(wǎng)頁制作基礎教程第二版seo查詢 站長之家
  • 信譽好的東莞網(wǎng)站建設網(wǎng)站收錄查詢代碼