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

Commit 49c41b2

Browse files
authored
Prepare Keras-MXNet 2.2.4.1 release (#199)
* Prepare Keras-MXNet 2.2.4.1 release * Fix typo * Add documentation on sparse operators
1 parent abc8a31 commit 49c41b2

File tree

5 files changed

+16
-4
lines changed

5 files changed

+16
-4
lines changed

docs/mxnet_backend/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
2. [Multi GPU Model Training](multi_gpu_training.md)
55
3. [Using RNN - Limitations and workarounds](using_rnn_with_mxnet_backend.md)
66
4. [Save MXNet model from Keras-MXNet](save_mxnet_model.md)
7-
5. [Prepare Sparse Data for Training](prepare_sparse_data_for_training.md)
7+
5. [Using Sparse Data with Keras-MXNet](using_sparse_data_with_mxnet_backend.md)
88
6. [Performance Tuning](performance_guide.md)
99
7. [Benchmark Results](../../benchmark/README.md)

docs/mxnet_backend/prepare_sparse_data_for_training.md renamed to docs/mxnet_backend/using_sparse_data_with_mxnet_backend.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,18 @@ output = Dense(units=1, activation='linear', sparse_weight=True)(input)
3434
Using sparse weight is useful in models where we need to invoke
3535
[dot operation](https://mxnet.incubator.apache.org/api/python/ndarray/sparse.html#mxnet.ndarray.sparse.dot) for training.
3636
In this code, setting sparse_weight to `True` will create a `row_sparse` tensor that will be used internally.
37+
### Sparse operators
38+
We have added sparse support for the following operators with MXNet backend:
39+
* sum
40+
* mean
41+
* dot
42+
* concat
43+
* Embedding
44+
For using Embedding layer with sparse data, we need to set flag `sparse_grad` to True
45+
```python
46+
embedding=Embedding(max_features, 128, input_length=10, sparse_grad=True)
47+
```
48+
Please see release notes for v2.2.4.1 for further details
3749
## Slice sparse data
3850
As MXNet sparse arrays do not support reshape operation, it is essential to be able to slice the data for training the
3951
model.

keras/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@
2323
from .models import Model
2424
from .models import Sequential
2525

26-
__version__ = '2.2.4'
26+
__version__ = '2.2.4.1'

keras/backend/mxnet_backend.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2786,7 +2786,7 @@ def rnn(step_function, inputs, initial_states,
27862786
# TODO: remove version check after mxnet 1.3.1 release
27872787
if mx.__version__ < '1.3.1':
27882788
raise NotImplementedError('unroll=False in RNN only works with MXNet 1.3.1 or newer, '
2789-
'please upgrade to latest master using: pip install --ugprade mxnet --pre')
2789+
'please upgrade to latest master using: pip install --upgrade mxnet --pre')
27902790
# defining step functions for each RNN cells, implementation taken from call functions
27912791
# from each RNN cell class in keras.layers.recurrent
27922792

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
'''
2727

2828
setup(name='keras-mxnet',
29-
version='2.2.4',
29+
version='2.2.4.1',
3030
description='Deep Learning for humans. Keras with highly scalable,\
3131
high performance Apache MXNet backend support.',
3232
long_description=long_description,

0 commit comments

Comments
 (0)