Added triangle coding for KMeansPartsLayer.
Pooling layer can handle dense representation.

So far this only works for final shape tough.