(lst)
| 1244 | |
| 1245 | |
| 1246 | def _batcher(lst): |
| 1247 | if F.is_tensor(lst[0]): |
| 1248 | return F.cat([F.unsqueeze(x, 0) for x in lst], dim=0) |
| 1249 | |
| 1250 | if isinstance(lst[0], np.ndarray): |
| 1251 | return F.tensor(np.array(lst)) |
| 1252 | |
| 1253 | return F.tensor(lst) |
| 1254 | |
| 1255 | |
| 1256 | def from_networkx( |
no outgoing calls
no test coverage detected