Body: <p>I want a neural network to learn the representation of a periodic function whose period is known to be <span class="math-container">$T$</span>.</p>
  <p>What is the correct way to achieve that? From my reading, I could infer two things:</p>
  <ol>
  <li>This <a href="https://arxiv.org/abs/2006.08195" rel="nofollow noreferrer">paper</a> proposes using an activation function of form <span class="math-container">$x + sin^2(x)$</span>.</li>
  <li>The above paper mentions that we can use <em>fourier features</em> when the period is known. However, I could not find any good reference of what does <em>fourier features</em> exactly mean.</li>
  </ol>
  <p>Can someone please explain or point to a resource that can explain how to incorporate fourier features into a NN?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-02-02T08:18:54.043Z
Comments.Text: Is there only one input variable? Or multiple variables, only one of which defines the space that the output repeats over? Do you have a strong requirement of continuity over the $T \rightarrow 0$ boundary?
Comments.UserDisplayName: Neil Slater
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-02-02T08:58:51.650Z
Comments.Text: Multiple variables, only one of which defines the space that the boundary repeats over. No requirement of continuity over the mentioned boundary
Comments.UserDisplayName: user185887
Tags: <neural-networks><machine-learning><deep-learning>
Title: What is the right way to make a neural network learn a period function with known period
UserDisplayName: user185887
ThreadText: # What is the right way to make a neural network learn a period function with known period
  
  (Asked by: username_0 on 2024-02-02)
  
  I want a neural network to learn the representation of a periodic function whose period is known to be $T$.
  
  What is the correct way to achieve that? From my reading, I could infer two things:
  
  1. This [paper](https://arxiv.org/abs/2006.08195) proposes using an activation function of form $x + sin^2(x)$.
  2. The above paper mentions that we can use *fourier features* when the period is known. However, I could not find any good reference of what does *fourier features* exactly mean.
  
  Can someone please explain or point to a resource that can explain how to incorporate fourier features into a NN?
  
  **Tags:** neural-networks, machine-learning, deep-learning
  > **Comments:**
  > **username_1**: Is there only one input variable? Or multiple variables, only one of which defines the space that the output repeats over? Do you have a strong requirement of continuity over the $T \rightarrow 0$ boundary?  
  > **username_0**: Multiple variables, only one of which defines the space that the boundary repeats over. No requirement of continuity over the mentioned boundary  
  
  ---
  
  ## 0 answers
  
  