Models

class Fourier_embedding

class tedeous.models.Fourier_embedding(L=[1], M=[1], ones=False)[source]

Bases: Module

Class for Fourier features generation.

Parameters:
  • L – list[float or None], sin(w*x)/cos(w*X) frequencie parameter, w = 2*pi/L

  • M – list[float or None], number of (sin, cos) pairs in result embedding

  • ones – bool, enter or not ones vector in result embedding.

Examples

u(t,x) if user wants to create 5 Fourier features in ‘x’ direction with L=5:

L=[None, 5], M=[None, 5].

forward(grid: Tensor) Tensor[source]

Forward method for Fourier features generation.

Parameters:

grid – calculation domain.

Returns:

embedding with Fourier features.

Return type:

out

class FourierNN

class tedeous.models.Fourier_embedding(L=[1], M=[1], ones=False)[source]

Bases: Module

Class for Fourier features generation.

Parameters:
  • L – list[float or None], sin(w*x)/cos(w*X) frequencie parameter, w = 2*pi/L

  • M – list[float or None], number of (sin, cos) pairs in result embedding

  • ones – bool, enter or not ones vector in result embedding.

Examples

u(t,x) if user wants to create 5 Fourier features in ‘x’ direction with L=5:

L=[None, 5], M=[None, 5].

forward(grid: Tensor) Tensor[source]

Forward method for Fourier features generation.

Parameters:

grid – calculation domain.

Returns:

embedding with Fourier features.

Return type:

out