Skip to content

Commit

Permalink
fixes mlverse#79, image_height and image_width are reversed (don't re…
Browse files Browse the repository at this point in the history
…spect change in get_image_size) for get_random_resized_crop_params() and transform_centre_crop.default()
  • Loading branch information
rdinnager committed Sep 27, 2023
1 parent b81b8fd commit 6eb43af
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions R/transforms-defaults.R
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ transform_center_crop.default <- function(img, size) {

size <- get_image_size(img)

image_height <- size[1]
image_width <- size[2]
image_height <- size[2]
image_width <- size[1]

crop_height <- output_size[1]
crop_width <- output_size[2]
Expand Down Expand Up @@ -171,7 +171,7 @@ transform_random_vertical_flip.default <- function(img, p = 0.5) {
get_random_resized_crop_params <- function(img, scale, ratio) {

img_size <- get_image_size(img)
width <- img_size[2]; height <- img_size[1]
width <- img_size[1]; height <- img_size[2]

area <- height * width

Expand Down

0 comments on commit 6eb43af

Please sign in to comment.