Giter VIP home page Giter VIP logo

sam's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sam's Issues

about the OUTPUT

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!

problem about pytorch inplace and can not training

it seems to be some issue with the code in sam.py forward function:

    if self.linear:
        output = self.input_layer(data, noise, adj_matrix * self.skeleton)

it change the graph makes autobackward could not work. but this just my surmise.

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).

output matrix reading

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.

problem about pytorch inplace and can not training

it seems to be some issue with the code in sam.py forward function:

    if self.linear:
        output = self.input_layer(data, noise, adj_matrix * self.skeleton)

it change the graph cause autobackward could not work. but this just my surmise.

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).

Threshold

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)?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.