You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2017/12/09 04:45:21 UTC
[GitHub] piiswrong closed pull request #8990: Fix Example example/dec/dec.py
piiswrong closed pull request #8990: Fix Example example/dec/dec.py
URL: https://github.com/apache/incubator-mxnet/pull/8990
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/example/deep-embedded-clustering/README.md b/example/deep-embedded-clustering/README.md
new file mode 100644
index 0000000000..90803d2ed1
--- /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 ac6545abb1..44e582d9f9 100644
--- a/example/dec/dec.py
+++ b/example/deep-embedded-clustering/dec.py
@@ -81,7 +81,7 @@ def list_arguments(self):
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)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services