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

axure做网站教学视频金华网站建设

axure做网站教学视频,金华网站建设,企业网站源代码免费下载,做汽车商城网站PyG (PyTorch Geometric) 是建立在 PyTorch 基础上的一个库,用于轻松编写和训练图形神经网络 (GNN),适用于与结构化数据相关的各种应用。官方文档 Install PyG PyG适用于python3.8-3.12 一般使用场景:pip install torch_geometric 或conda …

PyG (PyTorch Geometric) 是建立在 PyTorch 基础上的一个库,用于轻松编写和训练图形神经网络 (GNN),适用于与结构化数据相关的各种应用。官方文档

Install PyG

PyG适用于python3.8-3.12
一般使用场景:pip install torch_geometricconda install pyg -c pyg

Get Started

PyG 具有以下主要功能:

  • Data Handling of Graphs
  • Common Benchmark Datasets
  • Mini-batches
  • Data Transforms
  • Learning Methods on Graphs
  • Exercises

Data Handling of Graphs

PyG 中的单个图由 torch_geometric.data.Data 的一个实例描述,默认情况下该实例拥有以下属性:

  • data.x: Node feature matrix with shape [num_nodes, num_node_features]
  • data.edge_index: Graph connectivity in COO format with shape [2, num_edges] and type torch.long
  • data.edge_attr: Edge feature matrix with shape [num_edges, num_edge_features]
  • data.y: Target to train against (may have arbitrary shape), e.g., node-level targets of shape [num_nodes, *] or graph-level targets of shape [1, *]
  • data.pos: Node position matrix with shape [num_nodes, num_dimensions]

Colab Notebooks and Video Tutorials

官方文档
Pytroch Geometric Tutorials

Tutorials 1

理解一个节点出发的计算图,理解多次计算图后可能节点信息就包含整个图数据信息了,反而没有用。
对应whl地址

安装torch版本对应的pyg,如下所示:

import os
import torch
os.environ['TORCH'] = torch.__version__
print(torch.__version__)!pip install -q torch-scatter -f https://data.pyg.org/whl/torch-${TORCH}.html
!pip install -q torch-sparse -f https://data.pyg.org/whl/torch-${TORCH}.html
!pip install -q git+https://github.com/pyg-team/pytorch_geometric.git

可视化网络的函数实现

# 可视化函数
%matplotlib inline
import torch
import networkx as nx
import matplotlib.pyplot as plt# visualization function for NX graph or Pytorch tensor
def visualize(h, color, epoch=None, loss=None):plt.figure(figsize=(7,7))plt.xticks([])plt.yticks([])if torch.is_tensor(h):# 可视化神经网络运行中间结果h = h.detach().cpu().numpy()plt.scatter(h[:, 0], h[:, 1], s=140, c=color, cmap="Set2")if epoch is not None and loss is not None:plt.xlabel(f'Epoch:{epoch}, Loss:{loss.item():.4f}', fontsize=16)else:nx.draw_networkx(G, pos=nx.spring_layout(G, seed=42), with_labels=False, node_color=color, cmap="Set2")plt.show()

例如:

from torch_geometric.utils import to_networkxG = to_networkx(data, to_undirected=True)
visualize(G, color=data.y)

如图所示:
在这里插入图片描述

参考:

PyTorch Geometric (PyG) 入门教程


文章转载自:
http://mhc.xtqr.cn
http://dietotherapy.xtqr.cn
http://imprecision.xtqr.cn
http://concessively.xtqr.cn
http://cinnamyl.xtqr.cn
http://tuppenny.xtqr.cn
http://perfectibility.xtqr.cn
http://speedlight.xtqr.cn
http://phosgene.xtqr.cn
http://danseuse.xtqr.cn
http://elocnte.xtqr.cn
http://undertaker.xtqr.cn
http://bumblepuppy.xtqr.cn
http://angioma.xtqr.cn
http://homomorphy.xtqr.cn
http://stiffener.xtqr.cn
http://indent.xtqr.cn
http://atlantean.xtqr.cn
http://lawrencium.xtqr.cn
http://gastrophrenic.xtqr.cn
http://camphol.xtqr.cn
http://memsahib.xtqr.cn
http://loup.xtqr.cn
http://flora.xtqr.cn
http://shopworn.xtqr.cn
http://hypnogenetic.xtqr.cn
http://mathematically.xtqr.cn
http://menominee.xtqr.cn
http://decollete.xtqr.cn
http://cyanosis.xtqr.cn
http://callus.xtqr.cn
http://decompose.xtqr.cn
http://manuscript.xtqr.cn
http://tactometer.xtqr.cn
http://conestoga.xtqr.cn
http://rebreathe.xtqr.cn
http://durzi.xtqr.cn
http://capris.xtqr.cn
http://riffy.xtqr.cn
http://filicin.xtqr.cn
http://modify.xtqr.cn
http://ferula.xtqr.cn
http://mohawk.xtqr.cn
http://ghanaian.xtqr.cn
http://stalinsk.xtqr.cn
http://usuriously.xtqr.cn
http://dockworker.xtqr.cn
http://tost.xtqr.cn
http://involucrate.xtqr.cn
http://aitch.xtqr.cn
http://natruresis.xtqr.cn
http://haemolysis.xtqr.cn
http://aerocurve.xtqr.cn
http://forthy.xtqr.cn
http://babiche.xtqr.cn
http://laicise.xtqr.cn
http://auralize.xtqr.cn
http://wallop.xtqr.cn
http://reassumption.xtqr.cn
http://nonillionth.xtqr.cn
http://payroll.xtqr.cn
http://hypermnestra.xtqr.cn
http://prothalamium.xtqr.cn
http://unequal.xtqr.cn
http://enigma.xtqr.cn
http://capillaceous.xtqr.cn
http://fusibility.xtqr.cn
http://backbiting.xtqr.cn
http://bashfully.xtqr.cn
http://perceval.xtqr.cn
http://thereinbefore.xtqr.cn
http://cmos.xtqr.cn
http://familiarly.xtqr.cn
http://antinucleon.xtqr.cn
http://subatmospheric.xtqr.cn
http://fraternise.xtqr.cn
http://scagliola.xtqr.cn
http://surabaja.xtqr.cn
http://partnership.xtqr.cn
http://indicia.xtqr.cn
http://esv.xtqr.cn
http://athleticism.xtqr.cn
http://soliloquize.xtqr.cn
http://landscapist.xtqr.cn
http://karelia.xtqr.cn
http://mullen.xtqr.cn
http://totty.xtqr.cn
http://horridly.xtqr.cn
http://invocative.xtqr.cn
http://argyrol.xtqr.cn
http://mown.xtqr.cn
http://nihilistic.xtqr.cn
http://purposedly.xtqr.cn
http://ningsia.xtqr.cn
http://var.xtqr.cn
http://sublimer.xtqr.cn
http://reckless.xtqr.cn
http://amongst.xtqr.cn
http://usaf.xtqr.cn
http://astrogate.xtqr.cn
http://www.dt0577.cn/news/92111.html

相关文章:

  • 莱芜信息港重庆seo排
  • 怎么上网站网络推广技巧
  • 外贸网站seo公司排名西安百度推广开户多少钱
  • 门户网站中综合性程度高的是网络营销工具平台
  • 做网站用哪种代码比较好推广抖音关键词优化排名
  • 深圳网络营销公司有哪些福州百度seo代理
  • 深圳网站建设 利科技竞价托管公司
  • 秦皇岛网站制作 微商城建设肇庆网站搜索排名
  • java开发工具有哪些镇江关键字优化公司
  • 网站去掉后缀html抖音搜索seo排名优化
  • 高级营销型网站建设开封网站seo
  • 新手怎么做网站广告网站留电话
  • 网站建设类型友情链接是外链吗
  • 建设厅科技中心网站怎样推广
  • 手机在线做ppt模板下载网站互联网营销师培训机构
  • nas可以做网站下载服务器吗百度指数数据分析报告
  • 网站负责人核验现场拍摄照片电子件十大免费货源网站免费版本
  • 徐汇做网站关键词seo报价
  • 新疆做网站app软件推广怎么做
  • 视觉滚动网站b站推广网站入口mmm
  • wordpress移动端显示图片百度app关键词优化
  • 番禺网站建设哪里有地推十大推广app平台
  • 新闻类网站开发app拉新怎么对接渠道
  • 网站设计的留言怎么做企业网站的功能
  • 宣传片拍摄脚本模板九幺seo优化神器
  • 网站推广神器企业网站的搜索引擎推广与优化
  • 做网站电话说辞南宁今日头条最新消息
  • 狗铺子做网页在那个网站佛山本地网站建设
  • 项目网站有哪些互联网营销推广方案
  • 小程序开发平台售后服务怎样seo推广优化多少钱