Skip to content

elliot2/FourierTransform

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Neural Networks with Custom Velocity Mapping Layers for Trigonometric and Fourier Transformation Functions Approximation

Abstract:

In this paper, we present a novel neural network architecture that incorporates a custom velocity mapping layer for approximating trigonometric and Fourier transformation functions. The custom layer mimics the behavior of an iterative method, allowing the network to learn the underlying structure of these functions more effectively. The architecture successfully approximates trigonometric functions such as sine and cosine, along with performing forward and inverse Fourier transformations. This approach can be applied in a variety of fields where efficient and accurate function approximation is required.

Introduction

Trigonometric functions and Fourier transformations play a crucial role in various scientific and engineering applications. Neural networks have been used to approximate these complex functions due to their ability to learn underlying patterns in data. We propose a neural network architecture that incorporates a custom velocity mapping layer, specifically designed to approximate these functions.

Methodology

The proposed neural network architecture consists of three main components: a fully connected layer, a custom velocity mapping layer, and another fully connected layer. The custom velocity mapping layer mimics the behavior of an iterative method using an equation. The layer has three learnable parameters: tune, initial_displacement, and scaling_factor. To extend the functionality to Fourier transformations, the network is trained to perform forward and inverse Fourier transformations on the input data.

Implementation

The neural network architecture is implemented using PyTorch, a popular deep learning framework. The custom velocity mapping layer is implemented as a separate module with forward propagation defined according to the iterative method mentioned earlier. The learnable parameters are defined as PyTorch tensors and are initialized with appropriate values.

Training and Evaluation

The network is trained using the Adam optimizer and mean squared error (MSE) loss. The network is trained on random input samples from the range [0, 2π] for trigonometric functions, and random samples for Fourier transformations. The performance of the neural network is evaluated by comparing its predictions with the ground truth values of sine, cosine, and Fourier transformations. The results show that the proposed architecture achieves high accuracy in approximating these functions and performing transformations, with significantly lower loss compared to a standard feedforward network without the custom velocity mapping layer.

Conclusion

In this paper, we have presented a neural network architecture that incorporates a custom velocity mapping layer for approximating trigonometric functions and performing Fourier transformations. The proposed architecture achieves high accuracy in approximating these functions and transformations, showing potential for applications where efficient and accurate function approximation is needed. Future work could explore the application of this approach to other types of functions and the development of more efficient approximation techniques.

About

Fourier Transform train and predict

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages