Skip to content
This repository has been archived by the owner on Jul 1, 2024. It is now read-only.

fix test dataset #244

Merged
merged 3 commits into from
Aug 19, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion keras/activations.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def softmax(x, axis=-1):
e = K.exp(x - K.max(x, axis=axis, keepdims=True))
s = K.sum(e, axis=axis, keepdims=True)
return e / s
elif K.backend()=='mxnet' and ndim == 0:
elif K.backend() == 'mxnet' and ndim == 0:
# x dim is not inferred yet
return K.softmax(x)
else:
Expand Down
4 changes: 2 additions & 2 deletions keras/backend/mxnet_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -5680,8 +5680,8 @@ def _create_predict_module(self):
if self._context and hasattr(self._context[0], 'device_type') and self._context[0].device_type == 'eia':
# Only Prediction is Supported with EI Context
self._predict_only_module = mx.mod.Module(self._pred_mxnet_symbol, data_names=self._data_names,
label_names=self._label_names, context=self._context[0],
fixed_param_names=self._fixed_weights)
label_names=self._label_names, context=self._context[0],
fixed_param_names=self._fixed_weights)
else:
def sym_gen(phase):
return self._pred_mxnet_symbol, self._data_names, None
Expand Down
2 changes: 1 addition & 1 deletion keras/datasets/boston_housing.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def load_data(path='boston_housing.npz', test_split=0.2, seed=113):
path,
origin='https://s3.amazonaws.com/keras-datasets/boston_housing.npz',
file_hash='f553886a1f8d56431e820c5b82552d9d95cfcb96d1e678153f8839538947dff5')
with np.load(path) as f:
with np.load(path, allow_pickle=True) as f:
x = f['x']
y = f['y']

Expand Down
2 changes: 1 addition & 1 deletion keras/datasets/imdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def load_data(path='imdb.npz', num_words=None, skip_top=0,
path = get_file(path,
origin='https://s3.amazonaws.com/text-datasets/imdb.npz',
file_hash='599dadb1135973df5b59232a0e9a887c')
with np.load(path) as f:
with np.load(path, allow_pickle=True) as f:
x_train, labels_train = f['x_train'], f['y_train']
x_test, labels_test = f['x_test'], f['y_test']

Expand Down
2 changes: 1 addition & 1 deletion keras/datasets/reuters.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def load_data(path='reuters.npz', num_words=None, skip_top=0,
path = get_file(path,
origin='https://s3.amazonaws.com/text-datasets/reuters.npz',
file_hash='87aedbeb0cb229e378797a632c1997b6')
with np.load(path) as f:
with np.load(path, allow_pickle=True) as f:
xs, labels = f['x'], f['y']

np.random.seed(seed)
Expand Down