Procházet zdrojové kódy

Modified kmeans return value to accomodate to the changes made in master branch of tensorflow. (#229)

Jerry Ajay před 7 roky
rodič
revize
71afab1864
1 změnil soubory, kde provedl 35 přidání a 12 odebrání
  1. 35 12
      notebooks/2_BasicModels/kmeans.ipynb

+ 35 - 12
notebooks/2_BasicModels/kmeans.ipynb

@@ -38,9 +38,7 @@
   {
    "cell_type": "code",
    "execution_count": 2,
-   "metadata": {
-    "collapsed": false
-   },
+   "metadata": {},
    "outputs": [
     {
      "name": "stdout",
@@ -94,8 +92,8 @@
    "outputs": [],
    "source": [
     "# Build KMeans graph\n",
-    "(all_scores, cluster_idx, scores, cluster_centers_initialized, init_op,\n",
-    "train_op) = kmeans.training_graph()\n",
+    "(all_scores, cluster_idx, scores, cluster_centers_initialized, \n",
+    " cluster_centers_vars,init_op,train_op) = kmeans.training_graph()\n",
     "cluster_idx = cluster_idx[0] # fix for cluster_idx being a tuple\n",
     "avg_distance = tf.reduce_mean(scores)\n",
     "\n",
@@ -106,9 +104,7 @@
   {
    "cell_type": "code",
    "execution_count": 5,
-   "metadata": {
-    "collapsed": false
-   },
+   "metadata": {},
    "outputs": [
     {
      "name": "stdout",
@@ -142,9 +138,7 @@
   {
    "cell_type": "code",
    "execution_count": 7,
-   "metadata": {
-    "collapsed": false
-   },
+   "metadata": {},
    "outputs": [
     {
      "name": "stdout",
@@ -181,7 +175,7 @@
  "metadata": {
   "anaconda-cloud": {},
   "kernelspec": {
-   "display_name": "Python [default]",
+   "display_name": "Python 2",
    "language": "python",
    "name": "python2"
   },
@@ -196,6 +190,35 @@
    "nbconvert_exporter": "python",
    "pygments_lexer": "ipython2",
    "version": "2.7.12"
+  },
+  "varInspector": {
+   "cols": {
+    "lenName": 16,
+    "lenType": 16,
+    "lenVar": 40
+   },
+   "kernels_config": {
+    "python": {
+     "delete_cmd_postfix": "",
+     "delete_cmd_prefix": "del ",
+     "library": "var_list.py",
+     "varRefreshCmd": "print(var_dic_list())"
+    },
+    "r": {
+     "delete_cmd_postfix": ") ",
+     "delete_cmd_prefix": "rm(",
+     "library": "var_list.r",
+     "varRefreshCmd": "cat(var_dic_list()) "
+    }
+   },
+   "types_to_exclude": [
+    "module",
+    "function",
+    "builtin_function_or_method",
+    "instance",
+    "_Feature"
+   ],
+   "window_display": false
   }
  },
  "nbformat": 4,