AsianTaco / mpk

Convolutional neural network layer using symmetric kernels based on multipole expansion with spherical harmonics
0 stars 0 forks source link

tolerance for kernel weight sharing criterion #1

Open tlmakinen opened 1 month ago

tlmakinen commented 1 month ago

currently we compute d_i = euclidean_distance(w_i, centre) for some weight w_i in the kernel and then ask all d_i == d_j to share the same weight. We could enforce a tolerance instead such that d_i - d_j < tolerance which could avoid machine precision effects for ==.

tlmakinen commented 1 month ago

should be here https://github.com/AsianTaco/mpk/blob/a9baf0ea76d302fde5deabc243f284ac4440af9f/mpk/mpk_cnn_factory.py#L69C1-L70C1