Skip to content

Commit 32165d2

Browse files
authored
Fix RandomCrop transform
Fix RandomCrop transform msssing one offset position, use round() instead of floor() for startindices.
1 parent 302c09b commit 32165d2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/projective/crop.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ function offsetcropbounds(
122122
mins = getindex.(indices, 1)
123123
diffs = length.(indices) .- sz
124124

125-
startindices = floor.(Int, mins .+ (diffs .* offsets))
125+
startindices = round.(Int, mins .+ (diffs .* offsets))
126126
endindices = startindices .+ sz .- 1
127127

128128
bs = Bounds(UnitRange.(startindices, endindices))

0 commit comments

Comments
 (0)