the original code belongs to Raphael Pisoni and Github repo: https://github.com/sleepingcat4/sharpened-cosine-similarity/blob/main/keras/README.md
I wrapped the code around for this Python library
send me an email if you require help
How to use
from sharpcosine import CosSim2D
from sharpcosine import MaxAbsPool2D
model = tf.keras.Sequential(
[
tf.keras.layers.InputLayer(input_shape=input_shape),
CosSim2D(3, 32),
MaxAbsPool2D(2, True),
CosSim2D(3, 64,),
MaxAbsPool2D(2, True),
CosSim2D(3, 128),
MaxAbsPool2D(2, True),
tf.keras.layers.Flatten(),
tf.keras.layers.Dense(num_classes)
]
)
Credit: https://www.rpisoni.dev/posts/cossim-convolution-part2/
Metadata
Release files for sharpcosine 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sharpcosine-0.1.1.tar.gz | 2.7 kB | Without provenance | Details for sharpcosine-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sharpcosine-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for sharpcosine-0.1.1-py3-none-any.whl |
Total release size: 6.1 kB
Security for sharpcosine 0.1.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.