Skip to content

A PyTorch implementation of 2D SOM (Self Organizing Map) that runs fast.

License

Notifications You must be signed in to change notification settings

theblackfly/fast-som

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A PyTorch implementation of 2D SOM (Self Organizing Map) that runs fast.

The code is largely based on the original TensorFlow-implementation by Google engineer Sachin Joglekar's in his blogpost.

Screenshot

Here is the mandatory screenshot.

Screenshot 1

Why?

Although I could find--at the time of this writing--another implementation of a 2D-SOM in PyTorch in this repository which was also heavily based on the original TensorFlow implementation, the PyTorch code ran too slowly.

So, here's an implementation that runs fast (relatively). Enjoy! 👍

Usage

The som.py file contains the class definition of a 2D-SOM. Feel free to tweak it to your needs.

The colorsome.py file showcases a nice example of using the SOM2D class from som.py to cluster the RGB color space.

About

A PyTorch implementation of 2D SOM (Self Organizing Map) that runs fast.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages