dmlc / keras

Deep Learning library for Python. Convnets, recurrent neural networks, and more. Runs on MXNet, Theano or TensorFlow.
http://keras.io/
Other
125 stars 34 forks source link

Merge this branch with Keras 2.0 #66

Open rravu3 opened 7 years ago

rravu3 commented 7 years ago

Hi,

Wanted to ask what are the plans to pull in Keras 2.0 as there have been interface level changes from 1.2.2.

Rahul

kevinthesun commented 7 years ago

Yes. We will first finalize keras/mxnet for 1.2.2 and then switch to 2.0.

yliu7366 commented 7 years ago

Waiting for MXNet + Keras 2. I have networks developed based on Keras 2 and I am desperate for MXNet auto multi-GPU support....

TimZaman commented 7 years ago

@kevinthesun timeline? Why not try to merge this into Keras?

edmondja commented 6 years ago

:'( same as @yliu7366 I hope at least somebody has begun to work on this

davideboschetto commented 6 years ago

It would be great to have an update: are things still planned for a Keras2.0 upgrade?

kevinthesun commented 6 years ago

@sandeep-krishnamurthy

sandeep-krishnamurthy commented 6 years ago

Hi Yes. This is planned and work is in progress. I have implemented all basic tensor operators.. https://github.com/simpledl/keras/tree/mxnet_backend_keras2 Note above repo is just a placeholder I started working on. All work we do on Keras 2 will go to a PR on Keras 2.

davideboschetto commented 6 years ago

This is great @sandeep-krishnamurthy ! Keep up the good work, having the backend in keras2 would be amazing, thanks! Do you by any chance have a ballpark estimation for when the PR will come?

sandeep-krishnamurthy commented 6 years ago

Hello, Keras2+MXNet is almost complete. https://github.com/deep-learning-tools/keras/tree/keras2_mxnet_backend . Please try and provide your feedback.

I have created a PR - https://github.com/keras-team/keras/pull/9291 However, there are few design incompatibility with MXNet and Keras in the way Model compile and Optimizers are handled. Hence, few changes are requested by Keras community. These changes require significant modifications in MXNet Module and KVStore components. Hence, we talked to keras community to release the fork for the benefit of Keras users as the interface remains the same.

edmondja commented 6 years ago

@sandeep-krishnamurthy How to install the Keras2-compatible version ?

sandeep-krishnamurthy commented 6 years ago

@edmondja - Thanks for you interest. Please open issue at - https://github.com/deep-learning-tools/keras if you face any problems.

$ mkdir keras
$ git clone https://github.com/deep-learning-tools/keras ./keras/
$ cd keras/

# MXNet backend code is in keras2_mxnet_backend branch. Check it out.
$ git fetch
$ git checkout keras2_mxnet_backend
$ git pull

# Install Keras
$ sudo python setup.py install
edmondja commented 6 years ago

Hello, I used all of your instructions but I have this error :

File "/Users/edmondjacoupeau/anaconda/lib/python3.6/site-packages/keras/backend/init.py", line 72, in assert _backend in {'theano', 'tensorflow', 'cntk'}

AssertionError

sandeep-krishnamurthy commented 6 years ago

Hi @edmondja It looks like you have not checked out keras2_mxnet_backend branch. Can you please confirm? Because, in init.py you should see assert_backend in {'theano', 'tensorflow', 'cntk', 'mxnet'} like this https://github.com/deep-learning-tools/keras/blob/keras2_mxnet_backend/keras/backend/__init__.py#L72

sandeep-krishnamurthy commented 6 years ago

@edmondja - Did you had pre-installed keras (without mxnet backend)? If yes, please uninstall it before running above provided command.

$ pip uninstall keras
edmondja commented 6 years ago

Thanks it worked