View full-text article in PMC Sensors (Basel). 2024 Sep 26;24(19):6249. doi: 10.3390/s24196249 Search in PMC Search in PubMed View in NLM Catalog Add to search Copyright and License information © 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/). PMC Copyright notice Algorithm 3 PyTorch-like Code for choose_kan Function Input: name,c1,c2,k Output: Selected KAN convolutional layer 3: if name==’FastKANConv2DLayer’ then kan←FastKANConv2DLayer(c1,c2,kernel_size=k,padding=k//2) else if name==’KANConv2DLayer’ then 6: kan←KANConv2DLayer(c1,c2,kernel_size=k,padding=k//2) else if name==’KALNConv2DLayer’ then kan←KALNConv2DLayer(c1,c2,kernel_size=k,padding=k//2) 9: else if name==’KACNConv2DLayer’ then kan←KACNConv2DLayer(c1,c2,kernel_size=k,padding=k//2) else if name==’KAGNConv2DLayer’ then 12: kan←KAGNConv2DLayer(c1,c2,kernel_size=k,padding=k//2) end if Return kan