Skip to content

Commit

Permalink
Fix typos in create_dataset.rst
Browse files Browse the repository at this point in the history
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 a105063
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions docs/source/notes/create_dataset.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down

0 comments on commit a105063

Please sign in to comment.