Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
BTS-MTGNN
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhlj
BTS-MTGNN
Commits
4f3d6846
Commit
4f3d6846
authored
Mar 27, 2025
by
zhljJoan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix for test
parent
5a9ddff8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
7 deletions
+10
-7
examples/test_all.sh
+6
-6
starrygl/module/memorys.py
+4
-1
No files found.
examples/test_all.sh
View file @
4f3d6846
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
#跑了4卡的TaoBao
#跑了4卡的TaoBao
# 定义数组变量
# 定义数组变量
seed
=
$1
seed
=
$1
addr
=
"192.168.1.10
5
"
addr
=
"192.168.1.10
7
"
partition_params
=(
"ours"
)
partition_params
=(
"ours"
)
partition
=
"ours"
partition
=
"ours"
#"metis" "ldg" "random")
#"metis" "ldg" "random")
...
@@ -10,12 +10,12 @@ partition="ours"
...
@@ -10,12 +10,12 @@ partition="ours"
partitions
=
"8"
partitions
=
"8"
node_per
=
"4"
node_per
=
"4"
nnodes
=
"2"
nnodes
=
"2"
node_rank
=
"
0
"
node_rank
=
"
1
"
sample_type_params
=(
"recent"
"recent"
"
recent"
"recent"
"
boundery_recent_decay"
)
sample_type_params
=(
"recent"
"recent"
"boundery_recent_decay"
)
probability_params
=(
"0.1"
)
probability_params
=(
"0.1"
)
neg_policy
=(
"all"
"
local"
"local"
"local"
"loca
l"
)
neg_policy
=(
"all"
"
all"
"al
l"
)
topk_list
=(
"0
"
"0"
"0
.1"
"0.1"
"0.1"
)
topk_list
=(
"0.1"
"0.1"
"0.1"
)
memory_type
=(
"all_update"
"
all_update"
"all_update"
"all_update
"
"historical"
)
memory_type
=(
"all_update"
"
historical
"
"historical"
)
shared_memory_ssim
=(
"0.3"
)
shared_memory_ssim
=(
"0.3"
)
ssim
=
"0.3"
ssim
=
"0.3"
neighbor_num
=(
"10"
"20"
)
neighbor_num
=(
"10"
"20"
)
...
...
starrygl/module/memorys.py
View file @
4f3d6846
...
@@ -495,7 +495,10 @@ class AsyncMemeoryUpdater(torch.nn.Module):
...
@@ -495,7 +495,10 @@ class AsyncMemeoryUpdater(torch.nn.Module):
#upd0[mask] = self.ceil_updater(his_mem, b.srcdata['his_mem'][mask])
#upd0[mask] = self.ceil_updater(his_mem, b.srcdata['his_mem'][mask])
#updated_memory = torch.where(mask.unsqueeze(1),self.gamma*updated_memory0 + (1-self.gamma)*(b.srcdata['his_mem'])
#updated_memory = torch.where(mask.unsqueeze(1),self.gamma*updated_memory0 + (1-self.gamma)*(b.srcdata['his_mem'])
# ,updated_memory0)
# ,updated_memory0)
updated_memory
=
torch
.
where
(
mask
.
unsqueeze
(
1
),
torch
.
sigmoid
(
self
.
gamma
)
*
updated_memory0
+
(
1
-
torch
.
sigmoid
(
self
.
gamma
))
*
(
upd0
),
updated_memory0
)
if
self
.
mode
==
'historical'
:
updated_memory
=
torch
.
where
(
mask
.
unsqueeze
(
1
),
torch
.
sigmoid
(
self
.
gamma
)
*
updated_memory0
+
(
1
-
torch
.
sigmoid
(
self
.
gamma
))
*
(
upd0
),
updated_memory0
)
else
:
updated_memory
=
updated_memory0
#print('check {} {} {} {}'.format(self.gamma,updated_memory,torch.isnan(updated_memory).sum(),torch.isnan(updated_memory0).sum()))
#print('check {} {} {} {}'.format(self.gamma,updated_memory,torch.isnan(updated_memory).sum(),torch.isnan(updated_memory0).sum()))
#print(updated_memory,isnan)
#print(updated_memory,isnan)
with
torch
.
no_grad
():
with
torch
.
no_grad
():
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment