diviyan-kalainathan / sam Goto Github PK
View Code? Open in Web Editor NEWCode for the Structural Agnostic Model (https://arxiv.org/abs/1803.04929)
License: Apache License 2.0
Code for the Structural Agnostic Model (https://arxiv.org/abs/1803.04929)
License: Apache License 2.0
is:open label:"help wanted" sorry to be a bother, the output of my experiments are all fully connected graph, I do not know why, thank you for your reply!
if self.linear:
output = self.input_layer(data, noise, adj_matrix * self.skeleton)
detect by :with torch.autograd.set_detect_anomaly(True).
UserWarning: Error detected in AddmmBackward. No forward pass information available. Enable detect anomaly during forward pass for more information. (Triggered internally at ..\torch\csrc\autograd\python_anomaly_mode.cpp:85.)
i think that pytorch version maybe a problem,would you provide your pytorch version? (i did not find the version you used in the code)
or maybe it has something wrong in the other place, could you have a look on this problem? i would be grateful, thanks!
0%| | 0/11000 [00:00<?, ?it/s, disc=0.43, gen=-.373, regul_loss=0.719, tot=-2.64]Traceback (most recent call last):
File "D:\PyCharm 2021.3.2\plugins\python\helpers\pydev\pydevd.py", line 1483, in exec
pydev_imports.execfile(file, globals, locals) # execute the script
File "D:\PyCharm 2021.3.2\plugins\python\helpers\pydev_pydev_imps_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "E:/study/pycharm_project/dzx_policy/SAM-master/est_sam.py", line 19, in
m.predict(data, nruns=1, )
File "E:\study\pycharm_project\dzx_policy\SAM-master\sam\sam.py", line 352, in predict
device='cuda:0' if gpus else 'cpu')
File "E:\study\pycharm_project\dzx_policy\SAM-master\sam\sam.py", line 232, in run_SAM
loss.backward(retain_graph=True)
File "E:\study\pycharm_project\mental_bert\bert\lib\site-packages\torch\tensor.py", line 245, in backward
torch.autograd.backward(self, gradient, retain_graph, create_graph, inputs=inputs)
File "E:\study\pycharm_project\mental_bert\bert\lib\site-packages\torch\autograd_init.py", line 147, in backward
allow_unreachable=True, accumulate_grad=True) # allow_unreachable flag
RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation: [torch.FloatTensor [200, 1]], which is output 0 of TBackward, is at version 3; expected version 2 instead. Hint: enable anomaly detection to find the operation that failed to compute its gradient, with torch.autograd.set_detect_anomaly(True).
Hi, I was wondering how did you encode the output matrices
row --> column or column --> row
In other words, in the output matrix, the entry (1,2) means 1 --> 2 (row --> column) or 2 --> 1 (column --> row)
Thanks.
if self.linear:
output = self.input_layer(data, noise, adj_matrix * self.skeleton)
i think that pytorch version maybe a problem,would you provide your pytorch version? (i did not find the version you used in the code)
or maybe it has something wrong in the other place, could you have a look on this problem? i would be grateful, thanks!
0%| | 0/11000 [00:00<?, ?it/s, disc=0.43, gen=-.373, regul_loss=0.719, tot=-2.64]Traceback (most recent call last):
File "D:\PyCharm 2021.3.2\plugins\python\helpers\pydev\pydevd.py", line 1483, in exec
pydev_imports.execfile(file, globals, locals) # execute the script
File "D:\PyCharm 2021.3.2\plugins\python\helpers\pydev_pydev_imps_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "E:/study/pycharm_project/dzx_policy/SAM-master/est_sam.py", line 19, in
m.predict(data, nruns=1, )
File "E:\study\pycharm_project\dzx_policy\SAM-master\sam\sam.py", line 352, in predict
device='cuda:0' if gpus else 'cpu')
File "E:\study\pycharm_project\dzx_policy\SAM-master\sam\sam.py", line 232, in run_SAM
loss.backward(retain_graph=True)
File "E:\study\pycharm_project\mental_bert\bert\lib\site-packages\torch\tensor.py", line 245, in backward
torch.autograd.backward(self, gradient, retain_graph, create_graph, inputs=inputs)
File "E:\study\pycharm_project\mental_bert\bert\lib\site-packages\torch\autograd_init.py", line 147, in backward
allow_unreachable=True, accumulate_grad=True) # allow_unreachable flag
RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation: [torch.FloatTensor [200, 1]], which is output 0 of TBackward, is at version 3; expected version 2 instead. Hint: enable anomaly detection to find the operation that failed to compute its gradient, with torch.autograd.set_detect_anomaly(True).
When I run the SAM in the CDT I always become arrays that have two directions. I have checked the run_SAM and I don't see any conditions on the threshold although it is defined as a parameter.
How can I get the algorithm to decide which direction he wants and which directions are not eligible(close to 0)?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.