MCPcopy
hub / github.com/pyg-team/pytorch_geometric / t

Method t

torch_geometric/typing.py:328–335  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

326 self.size = size
327
328 def t(self) -> Tensor: # Only support accessing its transpose:
329 from torch_geometric.utils import to_torch_csr_tensor
330 size = self.size
331 return to_torch_csr_tensor(
332 self.edge_index.flip([0]),
333 self.edge_attr,
334 size[::-1] if isinstance(size, (tuple, list)) else size,
335 )
336
337
338# Types for accessing data ####################################################

Callers 15

test_contiguousFunction · 0.80
test_spspmmFunction · 0.80
test_contiguousFunction · 0.80
test_trim_to_layer_basicFunction · 0.80
test_geodesic_distanceFunction · 0.80
test_to_dense_adjFunction · 0.80
test_trimesh_vice_versaFunction · 0.80
test_to_trimeshFunction · 0.80

Calls 1

to_torch_csr_tensorFunction · 0.90

Tested by 15

test_contiguousFunction · 0.64
test_spspmmFunction · 0.64
test_contiguousFunction · 0.64
test_trim_to_layer_basicFunction · 0.64
test_geodesic_distanceFunction · 0.64
test_to_dense_adjFunction · 0.64
test_trimesh_vice_versaFunction · 0.64
test_to_trimeshFunction · 0.64