Skip to content

Commit 43428f6

Browse files
committed
add op_ifft2
1 parent 21b44ab commit 43428f6

File tree

3 files changed

+31
-0
lines changed

3 files changed

+31
-0
lines changed

.tether/man/keras.ops.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,7 @@ histogram(
289289
)
290290
hstack(xs)
291291
identity(n, dtype=None)
292+
ifft2(x)
292293
imag(x)
293294
image: Module(keras.api.ops.image)
294295
in_top_k(

R/ops.R

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -899,6 +899,35 @@ function (x)
899899
keras$ops$fft2(x)
900900

901901

902+
#' Computes the 2D Inverse Fast Fourier Transform along the last two axes of
903+
#'
904+
#' @description
905+
#' input.
906+
#'
907+
#' # Examples
908+
#' ```{r}
909+
#' x <- list(op_array(rbind(c(1, 2), c(2, 1))),
910+
#' op_array(rbind(c(0, 1), c(1, 0))))
911+
#' op_ifft2(x)
912+
#' ```
913+
#'
914+
#' @returns
915+
#' A tuple containing two tensors - the real and imaginary parts of the
916+
#' output.
917+
#'
918+
#' @param x
919+
#' Tuple of the real and imaginary parts of the input tensor. Both
920+
#' tensors in the tuple should be of floating type.
921+
#'
922+
#' @export
923+
#' @family math ops
924+
#' @family ops
925+
#' @tether keras.ops.ifft2
926+
op_ifft2 <-
927+
function (x)
928+
keras$ops$ifft2(tuple(x))
929+
930+
902931
#' Checks if the targets are in the top-k predictions.
903932
#'
904933
#' @description

tools/retether.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ if(FALSE) {
8888

8989
mk_export("keras.Model.set_state_tree")$dump |> cat_cb()
9090
mk_export("keras.layers.Solarization")$dump |> cat_cb()
91+
mk_export("keras.ops.ifft2")$dump |> cat_cb()
9192

9293
catched <- character()
9394
catch <- function(...) catched <<- c(catched, "\n\n", ...)

0 commit comments

Comments
 (0)