<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[StarfishCu的博客]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/StarfishCu</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; StarfishCu]]></copyright><item><title><![CDATA[Hugo建立个人学术网站]]></title><link>https://blog.youkuaiyun.com/StarfishCu/article/details/129101264</link><guid>https://blog.youkuaiyun.com/StarfishCu/article/details/129101264</guid><author>StarfishCu</author><pubDate>Sat, 18 Feb 2023 16:06:46 +0800</pubDate><description><![CDATA[1111111111111111111]]></description><category></category></item><item><title><![CDATA[csr_matrix,coo_matrix转化成torch.sparse matrix]]></title><link>https://blog.youkuaiyun.com/StarfishCu/article/details/128266755</link><guid>https://blog.youkuaiyun.com/StarfishCu/article/details/128266755</guid><author>StarfishCu</author><pubDate>Sat, 10 Dec 2022 16:54:37 +0800</pubDate><description><![CDATA[11111]]></description><category></category></item><item><title><![CDATA[dgl.metapath_reachable_graph]]></title><link>https://blog.youkuaiyun.com/StarfishCu/article/details/128104189</link><guid>https://blog.youkuaiyun.com/StarfishCu/article/details/128104189</guid><author>StarfishCu</author><pubDate>Tue, 29 Nov 2022 20:06:32 +0800</pubDate><description><![CDATA[啦啦啦啦啦]]></description><category></category></item><item><title><![CDATA[torch sparse tensor转化为scipy.sparse.csr_matrix]]></title><link>https://blog.youkuaiyun.com/StarfishCu/article/details/127122732</link><guid>https://blog.youkuaiyun.com/StarfishCu/article/details/127122732</guid><author>StarfishCu</author><pubDate>Fri, 30 Sep 2022 14:12:34 +0800</pubDate><description><![CDATA[abaaba]]></description><category></category></item><item><title><![CDATA[igraph load 无法读取保存的graph attr]]></title><link>https://blog.youkuaiyun.com/StarfishCu/article/details/126949132</link><guid>https://blog.youkuaiyun.com/StarfishCu/article/details/126949132</guid><author>StarfishCu</author><pubDate>Tue, 20 Sep 2022 11:03:58 +0800</pubDate><description><![CDATA[FUCK U IGRAPHLOAD]]></description><category></category></item><item><title><![CDATA[python-igraph无法保存特征矩阵 & python-igraph图转dgl图或pyg图]]></title><link>https://blog.youkuaiyun.com/StarfishCu/article/details/126938904</link><guid>https://blog.youkuaiyun.com/StarfishCu/article/details/126938904</guid><author>StarfishCu</author><pubDate>Mon, 19 Sep 2022 18:08:14 +0800</pubDate><description><![CDATA[煞笔igraph吃枣药丸]]></description><category></category></item><item><title><![CDATA[针对DGL的few-shot数据集划分方法]]></title><link>https://blog.youkuaiyun.com/StarfishCu/article/details/126733544</link><guid>https://blog.youkuaiyun.com/StarfishCu/article/details/126733544</guid><author>StarfishCu</author><pubDate>Tue, 06 Sep 2022 20:50:50 +0800</pubDate><description><![CDATA[DGL few-shot]]></description><category></category></item><item><title><![CDATA[pytorch：对list中的tensor做cat]]></title><link>https://blog.youkuaiyun.com/StarfishCu/article/details/126721660</link><guid>https://blog.youkuaiyun.com/StarfishCu/article/details/126721660</guid><author>StarfishCu</author><pubDate>Tue, 06 Sep 2022 11:42:33 +0800</pubDate><description><![CDATA[list中的tensor做cat]]></description><category></category></item><item><title><![CDATA[classification metrics：分类任务常用指标accuracy，macrof1,weightedf1的python实现]]></title><link>https://blog.youkuaiyun.com/StarfishCu/article/details/125986699</link><guid>https://blog.youkuaiyun.com/StarfishCu/article/details/125986699</guid><author>StarfishCu</author><pubDate>Tue, 26 Jul 2022 06:48:41 +0800</pubDate><description><![CDATA[sklearn实现Classification metrics]]></description><category></category></item><item><title><![CDATA[pytorch 模型参数不更新，模型不训练，loss不变，参数没有梯度]]></title><link>https://blog.youkuaiyun.com/StarfishCu/article/details/125969372</link><guid>https://blog.youkuaiyun.com/StarfishCu/article/details/125969372</guid><author>StarfishCu</author><pubDate>Mon, 25 Jul 2022 10:12:48 +0800</pubDate><description><![CDATA[模型不更新bug原因查找]]></description><category></category></item><item><title><![CDATA[记录pytorch机器学习踩过的大坑 每次开新工程前先看一遍]]></title><link>https://blog.youkuaiyun.com/StarfishCu/article/details/125875470</link><guid>https://blog.youkuaiyun.com/StarfishCu/article/details/125875470</guid><author>StarfishCu</author><pubDate>Tue, 19 Jul 2022 16:42:12 +0800</pubDate><description><![CDATA[pytorch机器学习踩过的坑
开坑前必看]]></description><category></category></item><item><title><![CDATA[GPPT阅读笔记]]></title><link>https://blog.youkuaiyun.com/StarfishCu/article/details/125600735</link><guid>https://blog.youkuaiyun.com/StarfishCu/article/details/125600735</guid><author>StarfishCu</author><pubDate>Mon, 04 Jul 2022 17:02:47 +0800</pubDate><description><![CDATA[GPPT阅读笔记]]></description><category></category></item><item><title><![CDATA[CONDA虚拟环境下GPU加速pytorch程序大坑记录！]]></title><link>https://blog.youkuaiyun.com/StarfishCu/article/details/116001337</link><guid>https://blog.youkuaiyun.com/StarfishCu/article/details/116001337</guid><author>StarfishCu</author><pubDate>Thu, 22 Apr 2021 10:01:16 +0800</pubDate><description><![CDATA[大坑：
前几天在服务器上的虚拟环境上使用gpu同时运行两个处理大数据集的程序，结果跑着跑着突然中断。原因很玄幻，是虚拟环境下的与运行的程序相关的包丢失了：pytorch，dgl等等都丢失了。而在程序刚开始运行时候这些包都存在。
直接原因及推测根本原因：
直接原因是两个程序在同一anaconda建立的虚拟环境下运行。
推测根本原因因为程序要处理的数据集很大，会占用大量cpu和gpu空间，在同一虚拟环境下运行会导致冲突？只是推测，如果有知道的朋友欢迎告诉我具体原因
解决方案：
只需要建立两个相同配置的虚拟环境，]]></description><category></category></item><item><title><![CDATA[DGL获得adj，edge_list]]></title><link>https://blog.youkuaiyun.com/StarfishCu/article/details/114876843</link><guid>https://blog.youkuaiyun.com/StarfishCu/article/details/114876843</guid><author>StarfishCu</author><pubDate>Tue, 16 Mar 2021 13:02:51 +0800</pubDate><description><![CDATA[DGL有内置函数adglgraph.adj可以获得adjmatrix，但问题是adjmatrix是sparse.tensor格式，无法直接调用我们想要的adj：
u=[0,0,0,1]
v=[1,1,2,2]
graph=dgl.DGLGraph((u,v))
print('graph',graph)
adj=graph.adjacency_matrix(transpose=True)
print('adj',adj)
&gt;&gt;&gt;graph DGLGraph(num_nodes=3, num_]]></description><category></category></item><item><title><![CDATA[pytorch 矩阵运算实现“笛卡尔加”]]></title><link>https://blog.youkuaiyun.com/StarfishCu/article/details/112475072</link><guid>https://blog.youkuaiyun.com/StarfishCu/article/details/112475072</guid><author>StarfishCu</author><pubDate>Mon, 11 Jan 2021 16:38:25 +0800</pubDate><description><![CDATA[问题定义见下图：给定A，B，求A“笛卡尔加”B（笛卡尔加类似于笛卡尔积，只是在合并时做了加法运算）

用for语句解决这个问题当然非常简单，但是for的性能损失太大（我在神经网络里，分别用for和矩阵运算实现了“笛卡尔加”，最终for的时间开销为8h+，矩阵运算为5min+），记录一下怎么用矩阵运算解决：
step
扩充A，B为（3,3,4）维度，得到_A , _B.
_A=([A1,A2,A3],[A1,A2,A3],[A1,A2,A3]) _B同理。
将_A的前两维转置后+_B即可得到AB的“笛卡尔加”]]></description><category></category></item><item><title><![CDATA[pytorch loss.item()大坑记录（非常重要！！！）]]></title><link>https://blog.youkuaiyun.com/StarfishCu/article/details/112473856</link><guid>https://blog.youkuaiyun.com/StarfishCu/article/details/112473856</guid><author>StarfishCu</author><pubDate>Mon, 11 Jan 2021 16:15:57 +0800</pubDate><description><![CDATA[跑神经网络时遇到的大坑：代码中所有的loss都直接用loss表示的，结果就是每次迭代，空间占用就会增加，直到cpu或者gup爆炸。
解决办法：把除了loss.backward()之外的loss调用都改成loss.item()，就可以解决。
原理可以见这里：https://www.zhihu.com/question/67209417/answer/344752405

...]]></description><category></category></item><item><title><![CDATA[用tensor创建tensor]]></title><link>https://blog.youkuaiyun.com/StarfishCu/article/details/112187151</link><guid>https://blog.youkuaiyun.com/StarfishCu/article/details/112187151</guid><author>StarfishCu</author><pubDate>Mon, 04 Jan 2021 17:01:14 +0800</pubDate><description><![CDATA[用两个长度相同的一维tensor（x,y)，生成一个新的二维tensor(z)，使z的第一行即x，第二行为y：
代码中的edge_index_pattern即z，dataset[“pattern”].edges(form=‘uv’)[0]即x，dataset[“pattern”].edges(form=‘uv’)[1]即y
由于不能直接使用tensor，所以需要先将tensor转为list即可
    edge_index_pattern=torch.tensor([dataset["pattern"].e]]></description><category></category></item><item><title><![CDATA[Ubuntu下安装Microsoft Teams]]></title><link>https://blog.youkuaiyun.com/StarfishCu/article/details/111840595</link><guid>https://blog.youkuaiyun.com/StarfishCu/article/details/111840595</guid><author>StarfishCu</author><pubDate>Mon, 28 Dec 2020 11:39:24 +0800</pubDate><description><![CDATA[先登录官网：https://www.microsoft.com/en-us/microsoft-365/microsoft-teams/download-app#allDevicesSection
下载DEB包。下载完成后，在DEB包目录下执行命令：
sudo dpkg -i teams_1.3.00.30857_amd64.deb
[sudo] starlien 的密码： 
正在选中未选择的软件包 teams。
(正在读取数据库 ... 系统当前共安装有 358741 个文件和目录。)
正准备解包 tea]]></description><category></category></item><item><title><![CDATA[生成有feature的pattern-graph数据集]]></title><link>https://blog.youkuaiyun.com/StarfishCu/article/details/111563576</link><guid>https://blog.youkuaiyun.com/StarfishCu/article/details/111563576</guid><author>StarfishCu</author><pubDate>Sat, 26 Dec 2020 19:10:34 +0800</pubDate><description><![CDATA[如果完全仿照generate_label的方式生成feature：
def generate_features(number_of_items, feature_dim, num_of_features):#考虑cora数据集，num_of_features代表一个维度里features有几个可选值（从0开始，例如：0,1,2...),feature_dim代表feature有几个维度
    features = np.zeros([number_of_items,feature_dim],dtype=i]]></description><category></category></item><item><title><![CDATA[Can Graph Neural Networks Count Substructures复现实验记录]]></title><link>https://blog.youkuaiyun.com/StarfishCu/article/details/111468419</link><guid>https://blog.youkuaiyun.com/StarfishCu/article/details/111468419</guid><author>StarfishCu</author><pubDate>Mon, 21 Dec 2020 14:39:46 +0800</pubDate><description><![CDATA[相比上一篇Nerual Subgraph Isomophism Counting的实验说明，这篇文章的实验说明很不详细，这里只关注subgraph部分，也就是synthetic文件夹下的代码，记录下复现过程：
记录
data文件夹中本来是没有lrp_save_path文件夹的，需要手动建立（这个代码里没有建立文件夹的代码）。
还需要在synthetic文件夹下建立save_model和results文件夹。

然后运行main_synthetic.py即可。


...]]></description><category></category></item></channel></rss>