mirror of
https://github.com/unanmed/ginka-generator.git
synced 2026-11-14 19:04:31 +08:00
fix: 浮点数被意外转成 LongTensor
This commit is contained in:
1 parent
325eb599c3
commit
6a1aeaa77e
7 files changed
+42
-63
No files matched your search
+1
-1
@@ -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 [];
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user