correct dtype
Browse files
README.md
CHANGED
@@ -68,7 +68,7 @@ Then `cd SBI-16-3D` and start python like:
|
|
68 |
```python
|
69 |
from datasets import load_dataset
|
70 |
dataset = load_dataset("./SBI-16-3D.py", "tiny", data_dir="./data/", streaming=True, trust_remote_code=True)
|
71 |
-
ds = dataset.with_format("np")
|
72 |
```
|
73 |
|
74 |
Now you should be able to use the `ds` variable like:
|
@@ -102,12 +102,12 @@ Then in your python script:
|
|
102 |
from datasets import load_dataset
|
103 |
import numpy
|
104 |
dataset = load_dataset("AstroCompress/SBI-16-3D", "tiny", streaming=True, trust_remote_code=True)
|
105 |
-
ds = dataset.with_format("np", columns=["image"], dtype=numpy.
|
106 |
|
107 |
# or torch
|
108 |
import torch
|
109 |
-
dst = dataset.with_format("torch", columns=["image"], dtype=torch.
|
110 |
|
111 |
# or pandas
|
112 |
-
dsp = dataset.with_format("pandas", columns=["image"], dtype=numpy.
|
113 |
```
|
|
|
68 |
```python
|
69 |
from datasets import load_dataset
|
70 |
dataset = load_dataset("./SBI-16-3D.py", "tiny", data_dir="./data/", streaming=True, trust_remote_code=True)
|
71 |
+
ds = dataset.with_format("np", dtype=torch.uint16)
|
72 |
```
|
73 |
|
74 |
Now you should be able to use the `ds` variable like:
|
|
|
102 |
from datasets import load_dataset
|
103 |
import numpy
|
104 |
dataset = load_dataset("AstroCompress/SBI-16-3D", "tiny", streaming=True, trust_remote_code=True)
|
105 |
+
ds = dataset.with_format("np", columns=["image"], dtype=numpy.uint16)
|
106 |
|
107 |
# or torch
|
108 |
import torch
|
109 |
+
dst = dataset.with_format("torch", columns=["image"], dtype=torch.uint16)
|
110 |
|
111 |
# or pandas
|
112 |
+
dsp = dataset.with_format("pandas", columns=["image"], dtype=numpy.uint16)
|
113 |
```
|