karpathy / convnetjs

Deep Learning in Javascript. Train Convolutional Neural Networks (or ordinary ones) in your browser.
MIT License
10.8k stars 2.04k forks source link

Fourier features #124

Open UPstartDeveloper opened 1 year ago

UPstartDeveloper commented 1 year ago

Closes #121. It's not perfect but I'd love to get folks' feedback on the current state of this code on this branch!

Change Summary:

  1. I added a new layer class called FourierFeatureLayer, and demo its usage by including it in the default neural network defined in the image_regression.js file
  2. I added my contact link in image_regression.html (in addition to keeping @karpathy 's Twitter handle link). Happy to keep working on this example and/or engage in further discussion about it!

Known limitations:

  1. For some reason, passing a value greater than 0 for gaussian_mapping_scale causes the loss of the model to plateau. For now I've set it so that it defaults to use using sinusoidal functions in the mapping (please the paper I'm working off of in case that sentence doesn't make sense).
  2. the addition of the Fourier Feature layer in image_regression.js causes the wall clock time for training to increase, and increases proportional to how high gaussian_mapping_scale.
371148606 commented 1 year ago

您好,我是薛文毅,已收到您的邮件,一会查收,谢谢!!