kitkatdafu
commited on
Commit
•
d6de56f
1
Parent(s):
59953e2
update
Browse files- jester_embedding.py +4 -4
jester_embedding.py
CHANGED
@@ -37,7 +37,7 @@ class JesterEmbedding(datasets.GeneratorBasedBuilder):
|
|
37 |
DEFAULT_CONFIG_NAME = "mistral" # It's not mandatory to have a default configuration. Just use one if it make sense.
|
38 |
|
39 |
def _info(self):
|
40 |
-
features = datasets.Features({"x": datasets.Array2D(shape=(
|
41 |
return datasets.DatasetInfo(
|
42 |
description=_DESCRIPTION,
|
43 |
features=features,
|
@@ -83,10 +83,10 @@ class JesterEmbedding(datasets.GeneratorBasedBuilder):
|
|
83 |
|
84 |
if split == "train":
|
85 |
for _id, x in enumerate(train):
|
86 |
-
yield _id, {"x": x}
|
87 |
elif split == "test":
|
88 |
for _id, x in enumerate(test):
|
89 |
-
yield _id, {"x": x}
|
90 |
else:
|
91 |
for _id, x in enumerate(val):
|
92 |
-
yield _id, {"x": x}
|
|
|
37 |
DEFAULT_CONFIG_NAME = "mistral" # It's not mandatory to have a default configuration. Just use one if it make sense.
|
38 |
|
39 |
def _info(self):
|
40 |
+
features = datasets.Features({"x": datasets.Array2D(shape=(1, _DIMS[self.config.name]), dtype="float32")})
|
41 |
return datasets.DatasetInfo(
|
42 |
description=_DESCRIPTION,
|
43 |
features=features,
|
|
|
83 |
|
84 |
if split == "train":
|
85 |
for _id, x in enumerate(train):
|
86 |
+
yield _id, {"x": x.reshape(1, -1)}
|
87 |
elif split == "test":
|
88 |
for _id, x in enumerate(test):
|
89 |
+
yield _id, {"x": x.reshape(1, -1)}
|
90 |
else:
|
91 |
for _id, x in enumerate(val):
|
92 |
+
yield _id, {"x": x.reshape(1, -1)}
|