foscat.backend#
Classes#
Module Contents#
- class foscat.backend.foscat_backend(name, mpi_rank=0, all_type='float64', gpupos=0, silent=False)[source]#
- TENSORFLOW = 1#
- TORCH = 2#
- NUMPY = 3#
- BACKEND#
- float64#
- float32#
- int64#
- int32#
- complex64#
- complex128#
- gpulist#
- ngpu = 1#
- periodic_pad(x, pad_height, pad_width)[source]#
Applies periodic (‘wrap’) padding to a 4D TensorFlow tensor (N, H, W, C).
Args: x (tf.Tensor): Input tensor with shape (batch_size, height, width, channels).
pad_height (tuple): Tuple (top, bottom) defining the vertical padding size. pad_width (tuple): Tuple (left, right) defining the horizontal padding size.
- Returns:
tf.Tensor: Tensor with periodic padding applied.