Skip to content Skip to sidebar Skip to footer

Cannot Change Number Of Clusters In Kmeansclustering Tensorflow

I found this code and it works perfectly. THe idea - split my data and train KMeansClustering on it. So I create InitHook and iterator and use it for training. class _IteratorInitH

Solution 1:

I found the problem: as you can see I save codebook to parameters/clusters. When it have created tensorflow save graph here too. So default behaviour for tensorflow - DO NOT CREATE new graph if it already exist!

So every time I tried to run KMeansClustering it still use graph, loaded from codebook. I solved the issue by deleting folder clusters every time I run KMeansClustering.

I still have some issues: I create new clusters, and start 2 scripts in parallel to create features using it: one of them creates for old codebook and one for new! Still forcing it, but my recommendation here is to restart everything after you created new codebook (maybe some info still loaded in tensorflow).

Post a Comment for "Cannot Change Number Of Clusters In Kmeansclustering Tensorflow"