ColorfulSoft / StyleTransfer-Colorization-SuperResolution

Demonstration implementations of neural network image processing algorithms
MIT License
43 stars 9 forks source link

Possible to remove matrix multiplication in SANet? #12

Closed ebroglio closed 3 years ago

ebroglio commented 3 years ago

Is it possible somehow to get rid of the two matrix multiplications in SANet.cs?

This is one reason it is really slow.

GlebSBrykin commented 3 years ago

Hello, ebroglio! Matrix multiplication is part of any attention module, whether it is self-attention or style-attention. Regarding the speed of work, the problem is most likely directly in the implementation of matrix multiplication. I will check this code and make edits if necessary. Sincerely, Gleb Brykin.