Datasets:
mb23
/

Languages:
English
License:
mickylan2367 commited on
Commit
38655b2
·
1 Parent(s): 8779c37

Update README

Browse files
Files changed (1) hide show
  1. README.md +24 -6
README.md CHANGED
@@ -120,8 +120,26 @@ return subset name list. for example,
120
  '''
121
  ```
122
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
123
 
124
- ### 2 : load dataset and change to dataloader:
125
  * You can use the code below:
126
  * <font color="red">...but (;・∀・)I don't know whether this code works efficiently, because I haven't tried this code so far</color>
127
  ```python
@@ -129,10 +147,10 @@ import datasets
129
  from datasets import load_dataset, DatasetDict
130
  from torchvision import transforms
131
  from torch.utils.data import DataLoader
132
- BATCH_SIZE = ???
133
- IMAGE_SIZE = ???
134
- TRAIN_SIZE = ??? # the number of training data
135
- TEST_SIZE = ??? # the number of test data
136
 
137
  def load_datasets():
138
 
@@ -145,7 +163,7 @@ def load_datasets():
145
  data_transform = transforms.Compose(data_transforms)
146
 
147
  data = load_dataset("mb23/GraySpectrogram", subset_list[0])
148
- for subset in subset_list:
149
  # Confirm subset_list doesn't include "remove_list" datasets in the above cell.
150
  print(subset)
151
  new_ds = load_dataset("mb23/GraySpectrogram", subset)
 
120
  '''
121
  ```
122
 
123
+ ### 2 : load dataset:
124
+ *
125
+ ```python
126
+ data = load_dataset("mb23/GraySpectrogram", subset_name_list[0])
127
+ for subset in subset_name_list:
128
+ # Confirm subset_list doesn't include "remove_list" datasets in the above cell.
129
+ print(subset)
130
+ new_ds = load_dataset("mb23/GraySpectrogram", subset)
131
+ new_dataset_train = datasets.concatenate_datasets([data["train"], new_ds["train"]])
132
+ new_dataset_test = datasets.concatenate_datasets([data["test"], new_ds["test"]])
133
+
134
+ # take place of data[split]
135
+ data["train"] = new_dataset_train
136
+ data["test"] = new_dataset_test
137
+
138
+ data
139
+ ```
140
+
141
 
142
+ ### 3 : load dataset and change to dataloader:
143
  * You can use the code below:
144
  * <font color="red">...but (;・∀・)I don't know whether this code works efficiently, because I haven't tried this code so far</color>
145
  ```python
 
147
  from datasets import load_dataset, DatasetDict
148
  from torchvision import transforms
149
  from torch.utils.data import DataLoader
150
+ # BATCH_SIZE = ???
151
+ # IMAGE_SIZE = ???
152
+ # TRAIN_SIZE = ??? # the number of training data
153
+ # TEST_SIZE = ??? # the number of test data
154
 
155
  def load_datasets():
156
 
 
163
  data_transform = transforms.Compose(data_transforms)
164
 
165
  data = load_dataset("mb23/GraySpectrogram", subset_list[0])
166
+ for subset in subset_name_list:
167
  # Confirm subset_list doesn't include "remove_list" datasets in the above cell.
168
  print(subset)
169
  new_ds = load_dataset("mb23/GraySpectrogram", subset)