Skip to main content

tf-som

Tensorflow self-organizing maps.

Locally competitive algorithms demonstrate superior convergence to their supervised counterparts over a suite of tasks. Try them yourself:

pip install tf-som
from .models import ConvNet

# build unsupervised base
unsupervised_base = ConvNet((H, W))

# train unsupervised
for x, _ in train_ds:
    unsupervised_base(x, training=True) 

...

# build supervised head
supervised_head = keras.Sequential([
    tfkl.Input(unsupervised_base.output_shape),
    tfkl.Conv2D(8, (3, 3), activation='relu'),
    tfkl.Flatten(),
    tfkl.Dense(N_classes, activation='softmax')
])

# assemble full classifier
unsupervised_base.trainable = False
classifier = keras.Sequential([
    unsupervised_base,
    supervised_head
])
classifier.compile('sgd', 'cross_entropy', 'accuracy')

# train supervised
classifier.fit(train_ds)

# compare model sizes
print(unsupervised_base.summary())
print(supervised_head.summary())

Metadata

Release files for tf-som 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tf-som 0.0.1
File Size Uploaded Provenance
tf-som-0.0.1.tar.gz 5.5 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for tf-som 0.0.1
File Interpreter ABI Platform
tf_som-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 12.3 kB

Release files / tf-som-0.0.1.tar.gz

Download URL tf-som-0.0.1.tar.gz
Size 5.5 kB
Tags Source
SHA-256 checksum
How to use checksums
4910a44254f463851ff71e5ae05261e5ae1d73f3a66d04dad541c49bf73cd4fa
BLAKE2b-256 checksum
How to use checksums
ae12880b1a430ed0109621b43148b4c57c8364efea8eaa3904280c84e44f6be6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/54.1.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.5

Release files / tf_som-0.0.1-py3-none-any.whl

Download URL tf_som-0.0.1-py3-none-any.whl
Size 6.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b5689e1fdd8a4584ab7d91dc7c8feb3fa3c0f8613eae54119c1637a9c0850d59
BLAKE2b-256 checksum
How to use checksums
acb8966777fc7531aebbdc36e8484ff164816e496af9f3ac91ce2ae2775e21bc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/54.1.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.5

Security for tf-som 0.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page