No project description provided
Project description
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/
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
sharpcosine-0.0.1.tar.gz
(3.6 kB
view hashes)
Built Distribution
Close
Hashes for sharpcosine-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 48ff6d61ba8ab6509d0f3d7424198f466f9f95c3bf610896a03477b056bc00b1 |
|
MD5 | 9d3811659ed295a801092f03bce269a8 |
|
BLAKE2b-256 | 10441266c56bb02797291ac1818921dce3ae104c050d565fed31ced3da8d2274 |