You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by jx...@apache.org on 2017/12/09 04:45:20 UTC

[incubator-mxnet] branch master updated: Fix Example example/dec/dec.py (#8990)

This is an automated email from the ASF dual-hosted git repository.

jxie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git


The following commit(s) were added to refs/heads/master by this push:
     new 3ee1ca2  Fix Example example/dec/dec.py (#8990)
3ee1ca2 is described below

commit 3ee1ca272964a8bfc1ca40a65c3341c58352f4a4
Author: mbaijal <30...@users.noreply.github.com>
AuthorDate: Fri Dec 8 20:45:17 2017 -0800

    Fix Example example/dec/dec.py (#8990)
    
    * Fix Example example/dec/dec.py
    
    * changing operater instead of typecast
---
 example/deep-embedded-clustering/README.md       | 9 +++++++++
 example/{dec => deep-embedded-clustering}/dec.py | 2 +-
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/example/deep-embedded-clustering/README.md b/example/deep-embedded-clustering/README.md
new file mode 100644
index 0000000..90803d2
--- /dev/null
+++ b/example/deep-embedded-clustering/README.md
@@ -0,0 +1,9 @@
+# DEC Implementation
+This is based on the paper `Unsupervised deep embedding for clustering analysis` by  Junyuan Xie, Ross Girshick, and Ali Farhadi
+
+## Prerequisite
+  - Install Scikit-learn: `python -m pip install --user sklearn`
+  - Install SciPy: `python -m pip install --user scipy`
+
+## Usage
+run `python dec.py`
\ No newline at end of file
diff --git a/example/dec/dec.py b/example/deep-embedded-clustering/dec.py
similarity index 99%
rename from example/dec/dec.py
rename to example/deep-embedded-clustering/dec.py
index ac6545a..44e582d 100644
--- a/example/dec/dec.py
+++ b/example/deep-embedded-clustering/dec.py
@@ -81,7 +81,7 @@ class DECModel(model.MXModel):
             return ['data', 'mu', 'label']
 
     def setup(self, X, num_centers, alpha, save_to='dec_model'):
-        sep = X.shape[0]*9/10
+        sep = X.shape[0]*9//10
         X_train = X[:sep]
         X_val = X[sep:]
         ae_model = AutoEncoderModel(self.xpu, [X.shape[1],500,500,2000,10], pt_dropout=0.2)

-- 
To stop receiving notification emails like this one, please contact
['"commits@mxnet.apache.org" <co...@mxnet.apache.org>'].