From 28712e354bfefe3099b0c5eb5cdfb8cae144d0fd Mon Sep 17 00:00:00 2001 From: Rishabh <59335537+rbSparky@users.noreply.github.com> Date: Thu, 1 Aug 2024 15:33:13 +0530 Subject: [PATCH] Update GNNGraphs/src/transform.jl Co-authored-by: Carlo Lucibello --- GNNGraphs/src/transform.jl | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/GNNGraphs/src/transform.jl b/GNNGraphs/src/transform.jl index d7177a0e8..8e8c98d13 100644 --- a/GNNGraphs/src/transform.jl +++ b/GNNGraphs/src/transform.jl @@ -214,14 +214,7 @@ end function remove_edges(g::GNNGraph{<:COO_T}, p = 0.5) num_edges = g.num_edges edges_to_remove = filter(_ -> rand() < p, 1:num_edges) - g = remove_edges(g, edges_to_remove) - s, t = edge_index(g) - w = get_edge_weight(g) - edata = g.edata - return GNNGraph((s, t, w), - g.num_nodes, length(s), g.num_graphs, - g.graph_indicator, - g.ndata, edata, g.gdata) + return remove_edges(g, edges_to_remove) end """