Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
AbhinavTuli authored Dec 8, 2020
1 parent 6a4616c commit d4de9b2
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ pip3 install hub

You can access public datasets with a few lines of code.
```python
import hub
from hub import Dataset

mnist = hub.load("activeloop/mnist")
mnist = Dataset("activeloop/mnist")
mnist["image"][0:1000].compute()
```

Expand All @@ -70,10 +70,10 @@ mnist["image"][0:1000].compute()
Load the data and directly train your model using pytorch

```python
import hub
from hub import Dataset
import torch

mnist = hub.load("activeloop/mnist")
mnist = Dataset("activeloop/mnist")
mnist = mnist.to_pytorch(lambda x: (x["image"], x["label"]))

train_loader = torch.utils.data.DataLoader(mnist, batch_size=1, num_workers=0)
Expand All @@ -96,7 +96,7 @@ from hub import Dataset, schema
import numpy as np

ds = Dataset(
"username/basic",
"username/dataset_name",
shape = (4,),
mode = "w+",
schema = {
Expand All @@ -112,11 +112,11 @@ ds.commit()

3. Access it from anywhere else in the world, on any device having a command line.
```python
import hub
from hub import Dataset

ds = hub.load("username/basic")
ds = Dataset("username/dataset_name")
```
Instead of `username/basic` you could also use `./local/path/`, `s3://path` or `gcs://`
Instead of `username/dataset_name` you could also use `./local/path/`, `s3://path` or `gcs://`

## Documentation

Expand Down

0 comments on commit d4de9b2

Please sign in to comment.