Comments (12)
Hi @shubhaminnani - At the time of this publication, one of the earliest versions of torch-geometric
was used. Your torch-scatter
, torch-sparse
, and other packages are of the latest update and may not have good backwards compatibility with previous versions of PyG.
For this study: the dependencies for PyG==1.3.0 may have been torch-scatter==1.3.1, torch-sparse==0.4.0, torch-cluster==1.4.4. Though this codebase depends on legacy code, I would recommend updating everything to the most recent versions of PyG, which may require some minor modifications to the forward pass of some of the model architectures. In addition, note that there may be some minor instabilities with previous versions of PyG, e.g. - pytorch/pytorch#50469.
from pathomicfusion.
Thanks for update. Will check and revert with you!
from pathomicfusion.
Hi @Richarizardd ,
I am pretty much new to Pathology, if you can help to update the code, it will be really helpful.
Thanks!
from pathomicfusion.
I was not able to understand whats needs to be changed here.
class GraphNet(torch.nn.Module):
def __init__(self, features=1036, nhid=128, grph_dim=32, nonlinearity=torch.tanh,
dropout_rate=0.25, GNN='GCN', use_edges=0, pooling_ratio=0.20, act=None, label_dim=1, init_max=True):
super(GraphNet, self).__init__()
self.dropout_rate = dropout_rate
self.use_edges = use_edges
self.act = act
self.conv1 = SAGEConv(features, nhid)
self.pool1 = SAGPooling(nhid, ratio=pooling_ratio, gnn=GNN)#, nonlinearity=nonlinearity)
self.conv2 = SAGEConv(nhid, nhid)
self.pool2 = SAGPooling(nhid, ratio=pooling_ratio, gnn=GNN)#, nonlinearity=nonlinearity)
self.conv3 = SAGEConv(nhid, nhid)
self.pool3 = SAGPooling(nhid, ratio=pooling_ratio, gnn=GNN)#, nonlinearity=nonlinearity)
self.lin1 = torch.nn.Linear(nhid*2, nhid)
self.lin2 = torch.nn.Linear(nhid, grph_dim)
self.lin3 = torch.nn.Linear(grph_dim, label_dim)
self.output_range = Parameter(torch.FloatTensor([6]), requires_grad=False)
self.output_shift = Parameter(torch.FloatTensor([-3]), requires_grad=False)
if init_max:
init_max_weights(self)
print("Initialzing with Max")
def forward(self, **kwargs):
data = kwargs['x_grph']
data = NormalizeFeaturesV2()(data)
data = NormalizeEdgesV2()(data)
x, edge_index, edge_attr, batch = data.x, data.edge_index, data.edge_attr, data.batch
#x, edge_index, edge_attr, batch = data.x.type(torch.cuda.FloatTensor), data.edge_index.type(torch.cuda.LongTensor), data.edge_attr.type(torch.cuda.FloatTensor), data.batch
x = F.relu(self.conv1(x, edge_index)) ##need to check this
From above code, it seem we are passing 5 values only, but torch_scatter throws the Error.
Can you please suggest?
from pathomicfusion.
I also encountered this problem. Have you solved it?
from pathomicfusion.
from pathomicfusion.
This is version dependencies of PyG. I was not able to look into this further.
Thanks!
from pathomicfusion.
i have solved. you should change the ''scatter.py'' file.
from pathomicfusion.
Hi @zqy396
Can you please post the changes from the scatter.py? It will be really helpful.
Thanks!
from pathomicfusion.
Is this the correct thing to be updated?
from pathomicfusion.
@zqy396
May I ask how you made modifications in the scatter.py file?
from pathomicfusion.
https://blog.csdn.net/m0_37052320/article/details/118368656
@zqy396 May I ask how you made modifications in the scatter.py file?
from pathomicfusion.
Related Issues (20)
- Reproducibility of the GBMLGG results HOT 2
- Regarding reprudicing the same result of pathomic fusion HOT 2
- About the CIndex HOT 1
- Regard reproducing the GBMLGG grade calssification HOT 6
- CPC training HOT 2
- Can't find some .pt files about graph features HOT 5
- CPC_model checkpoints missing HOT 2
- How does the loss function for grade task work (CNN-only)? HOT 3
- Segmentation fault (core dumped)
- Is the molueculare subtype feature included in the Grade classification task? HOT 4
- The generation of pkl files HOT 2
- Validation data is same as testing data?
- TypeError: scatter_mean() takes from 2 to 5 positional arguments but 6 were given HOT 1
- About the pkl files HOT 3
- options.py HOT 1
- KNN for Cell Graph Construction HOT 1
- Regard reproducing the GBMLGG survival prediction HOT 2
- could not find MaskCNN and resnet_custom HOT 2
- Data cannot be downloaded HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pathomicfusion.