Skip to content
Permalink
Browse files

Fix typos in create_dataset.rst

Adjust indentation to four spaces
Change `ops.join` to `osp.join`
Add matching parenthesis
  • Loading branch information...
kamilest committed Nov 6, 2019
1 parent fcec2ac commit a1050630d2170e64380ad6c08995b6efd091e159
Showing with 7 additions and 7 deletions.
  1. +7 −7 docs/source/notes/create_dataset.rst
@@ -123,20 +123,20 @@ Let's see this process in a simplified example:
def process(self):
i = 0
for raw_path in self.raw_paths:
# Read data from `raw_path`.
data = Data(...)
# Read data from `raw_path`.
data = Data(...)
if self.pre_filter is not None and not self.pre_filter(data):
continue
if self.pre_filter is not None and not self.pre_filter(data):
continue
if self.pre_transform is not None:
data = self.pre_transform(data)
data = self.pre_transform(data)
torch.save(data, ops.join(self.processed_dir, 'data_{}.pt'.format(i)))
torch.save(data, osp.join(self.processed_dir, 'data_{}.pt'.format(i)))
i += 1
def get(self, idx):
data = torch.load(osp.join(self.processed_dir, 'data_{}.pt'.format(idx))
data = torch.load(osp.join(self.processed_dir, 'data_{}.pt'.format(idx)))
return data
Here, each graph data object gets saved individually in :meth:`torch_geometric.data.Dataset.process`, and is manually loaded in :meth:`torch_geometric.data.Dataset.get`.

0 comments on commit a105063

Please sign in to comment.
You can’t perform that action at this time.