You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import torchdrug as td
from torchdrug import data
edge_list = [[0, 1], [1, 2], [2, 3], [3, 4], [4, 5], [5, 0]]
graph = data.Graph(edge_list, num_node=6)
graph.visualize()
Then shows:
ImportError Traceback (most recent call last)
<ipython-input-10-bbad14b8be21> in <module>()
1 import torch
2 import torchdrug as td
----> 3 from torchdrug import data, datasets, core, models, tasks
4 get_ipython().magic('matplotlib inline')
5
ImportError: cannot import name 'data' from 'torchdrug' (unknown location)
---------------------------------------------------------------------------
NOTE: If your import is failing due to a missing package, you can
manually install dependencies using either !pip or !apt.
To view examples of installing some common dependencies, click the
"Open Examples" button below.
---------------------------------------------------------------------------
How can solve this probelm?
The text was updated successfully, but these errors were encountered:
shichence
changed the title
ImportError: cannot import name 'data' from 'torchdrug' (unknown location)
(Google Colab Installation) ImportError: cannot import name 'data' from 'torchdrug' (unknown location)
Aug 15, 2021
Uh oh!
There was an error while loading. Please reload this page.
Dear sir:
I am trying to use torchdrug on Google Colab. Here is my code.
All seems to be well.
But when I run
Then shows:
How can solve this probelm?
The text was updated successfully, but these errors were encountered: