From 6c4641ba83ecc1cd0307db2682ea6ee1ec1226b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D9=85=D8=AD=D9=85=D8=AF=20=D8=A7=D9=84=D8=AF=D8=B3=D9=88?= =?UTF-8?q?=D9=82=D9=8A?= <39778149+mohamed-180@users.noreply.github.com> Date: Fri, 11 Mar 2022 23:21:53 +0200 Subject: [PATCH 1/3] Update backend.R --- R/backend.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/backend.R b/R/backend.R index 38c6eefa3..5effe6e36 100644 --- a/R/backend.R +++ b/R/backend.R @@ -120,7 +120,7 @@ k_argmax <- function(x, axis = -1) { keras$backend$argmax( x = x, axis = as_axis(axis) - ) + ) + 1L # Use 1-based for returned value } @@ -139,7 +139,7 @@ k_argmin <- function(x, axis = -1) { keras$backend$argmin( x = x, axis = as_axis(axis) - ) + ) + 1L # Use 1-based for returned value } From 9a6aad06a48dfc2e796b6ab2f2db054dda356a1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D9=85=D8=AD=D9=85=D8=AF=20=D8=A7=D9=84=D8=AF=D8=B3=D9=88?= =?UTF-8?q?=D9=82=D9=8A?= <39778149+mohamed-180@users.noreply.github.com> Date: Sat, 12 Mar 2022 13:33:26 +0200 Subject: [PATCH 2/3] Update NEWS.md --- NEWS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/NEWS.md b/NEWS.md index 3a77514b0..e1059f078 100644 --- a/NEWS.md +++ b/NEWS.md @@ -57,6 +57,7 @@ - k_squeeze(): `axis` argument can be ommitted, in which case all axes of size 1 are dropped. - k_tile(): `n` argument can now be supplied as a tensor. - New function `k_unstack()`. + - `k_argmax()`, `k_argmin()` returned values are one based. - KerasTensor objects (e.g, returned by `layer_input()`) now inherit from `"tensorflow.tensor"`. From 23ee835563b4a6ef163f5c3898530cffe199d792 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D9=85=D8=AD=D9=85=D8=AF=20=D8=A7=D9=84=D8=AF=D8=B3=D9=88?= =?UTF-8?q?=D9=82=D9=8A?= <39778149+mohamed-180@users.noreply.github.com> Date: Sat, 12 Mar 2022 13:36:44 +0200 Subject: [PATCH 3/3] Update backend.R --- R/backend.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/backend.R b/R/backend.R index 5effe6e36..cfe015fa0 100644 --- a/R/backend.R +++ b/R/backend.R @@ -111,7 +111,7 @@ k_arange <- function(start, stop = NULL, step = 1, dtype = "int32") { #' @param axis Axis along which to perform the reduction (axis indexes are #' 1-based). Pass -1 (the default) to select the last axis. #' -#' @return A tensor. +#' @return A 1-based tensor. #' #' @template roxlate-keras-backend #' @@ -130,7 +130,7 @@ k_argmax <- function(x, axis = -1) { #' @param axis Axis along which to perform the reduction (axis indexes are #' 1-based). Pass -1 (the default) to select the last axis. #' -#' @return A tensor. +#' @return A 1-based tensor. #' #' @template roxlate-keras-backend #'