fix: 浮点数被意外转成 LongTensor

This commit is contained in:
AncTe committed 2025-04-03 12:12:13 +08:00
1 parent 325eb599c3
commit 6a1aeaa77e
7 files changed
+42 -63

No files matched your search

+1 -1
View File
@@ -35,7 +35,7 @@ function generateGANData(
map: number[][]
) {
const id2 = `$${id++}`;
const toTrain = chooseFrom(keys, 30);
const toTrain = chooseFrom(keys, 4);
const data = toTrain.map<MinamoTrainData[]>(v => {
const floor = refer.get(v);
if (!floor) return [];
+2 -1
View File
@@ -87,7 +87,8 @@ function weisfeilerLehmanIteration(
});
weight *= decay;
});
// 把每个节点的原始标签也加上,权重使用最远权重,可以认为是资源重复率
// 把每个节点的原始标签也加上,权重使用最远权重再衰减2次,可以认为是资源重复率
weight *= decay ** 2;
nodes.forEach(node => {
if (!numMap.has(node.originalLabel)) {
numMap.set(node.originalLabel, weight);