Commit 58997113 authored by W.D.R.P. Sandeepa's avatar W.D.R.P. Sandeepa

implemented load_dataset function

parent 4dda1df9
...@@ -12,6 +12,17 @@ BATCH_SIZE = 32 ...@@ -12,6 +12,17 @@ BATCH_SIZE = 32
NUM_KEYWORDS = 10 NUM_KEYWORDS = 10
def load_dataset(data_path):
with open(data_path, "r") as fp:
data = json.load(fp)
# extract input and targets
X = np.array(data["MFCCs"])
y = np.array(data["labels"])
return X, y
def get_data_splits(data_path, test_size=0.1, test_validation=0.1): def get_data_splits(data_path, test_size=0.1, test_validation=0.1):
# load dataset # load dataset
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment