Skip to content

Commit 3dacff6

Browse files
committed
add file
1 parent b16629f commit 3dacff6

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

tests/integ/datasets.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License"). You
4+
# may not use this file except in compliance with the License. A copy of
5+
# the License is located at
6+
#
7+
# http://aws.amazon.com/apache2.0/
8+
#
9+
# or in the "license" file accompanying this file. This file is
10+
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
11+
# ANY KIND, either express or implied. See the License for the specific
12+
# language governing permissions and limitations under the License.
13+
from __future__ import absolute_import
14+
15+
import gzip
16+
import os
17+
import pickle
18+
19+
from tests.integ import DATA_DIR
20+
21+
22+
def one_p_mnist():
23+
data_path = os.path.join(DATA_DIR, "one_p_mnist", "mnist.pkl.gz")
24+
with gzip.open(data_path, "rb") as f:
25+
training_set, _, _ = pickle.load(f, encoding="latin1")
26+
27+
return training_set

0 commit comments

Comments
 (0)