The error message suggests that the InMemoryDataset class cannot be imported from the torch_geometric.datasets module. This could be due to a few possible reasons:

  1. Outdated or incompatible version: Make sure you have the latest version of torch_geometric installed. You can try updating it using pip install --upgrade torch-geometric.

  2. Incorrect installation: If you recently installed torch_geometric, try reinstalling it by following the installation instructions provided in the official documentation.

  3. Incorrect import statement: Double-check that you are importing the correct class from the correct module. The InMemoryDataset class should be imported from torch_geometric.data instead of torch_geometric.datasets.

Make sure to address these potential issues and try again. If the problem persists, provide more information about your environment and the steps you followed to install torch_geometric so that we can assist you further.

ImportError Traceback most recent call last Cell In1 line 6 4 from torch_geometricdata import DataLoader 5 from torch_geometricnn import GCNConv ---- 6 from t

原文地址: https://www.cveoy.top/t/topic/i6c0 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录