You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
functionupsample_linear_kernel!(output::AbstractArray{T,3}, input::AbstractArray{T,3}) where T
147
+
functionupsample_linear_wcn!(output::AbstractArray{T,3}, input::AbstractArray{T,3}) where T
139
148
size(input)[2:3] ==size(output)[2:3] ||error("Number of input and output channels and batches must match. Got input $(size(input)) and output $(size(output))")
140
149
in_w, channels, batches =size(input)
141
150
# treat batch and channel dimension as one for better parallelization granularity
@@ -161,7 +170,7 @@ end
161
170
162
171
# bilinear
163
172
# linearly upsamples first two dims of 4D array
164
-
functionupsample_linear_kernel!(output::AbstractArray{T,4}, input::AbstractArray{T,4}) where T
173
+
functionupsample_bilinear_whcn!(output::AbstractArray{T,4}, input::AbstractArray{T,4}) where T
165
174
size(input)[3:4] ==size(output)[3:4] ||error("Number of input and output channels and batches must match. Got input $(size(input)) and output $(size(output))")
166
175
in_w, in_h, channels, batches =size(input)
167
176
# treat batch and channel dimension as one for better parallelization granularity
@@ -194,7 +203,7 @@ end
194
203
195
204
# trilinear
196
205
# linearly upsamples first three dims of 5D array
197
-
functionupsample_linear_kernel!(output::AbstractArray{T,5}, input::AbstractArray{T,5}) where T
206
+
functionupsample_trilinear_whdcn!(output::AbstractArray{T,5}, input::AbstractArray{T,5}) where T
198
207
size(input)[4:5] ==size(output)[4:5] ||error("Number of input and output channels and batches must match. Got input $(size(input)) and output $(size(output))")
199
208
in_w, in_h, in_d, channels, batches =size(input)
200
209
# treat batch and channel dimension as one for better parallelization granularity
@@ -254,7 +263,7 @@ function ∇upsample_linear(Δ::AbstractArray{T,N}; size::NTuple{<:Any,Integer})
254
263
end
255
264
256
265
# linear
257
-
function∇upsample_linear_kernel!(dx::AbstractArray{T,3}, Δ::AbstractArray{T,3}) where T
266
+
function∇upsample_linear_wcn!(dx::AbstractArray{T,3}, Δ::AbstractArray{T,3}) where T
258
267
size(dx)[2:3] ==size(Δ)[2:3] ||error("Number of input and output channels and batches must match. Got input $(size(input)) and output $(size(output))")
259
268
in_w, channels, batches =size(dx)
260
269
@@ -280,7 +289,7 @@ function ∇upsample_linear_kernel!(dx::AbstractArray{T,3}, Δ::AbstractArray{T,
280
289
end
281
290
282
291
# bilinear
283
-
function∇upsample_linear_kernel!(dx::AbstractArray{T,4}, Δ::AbstractArray{T,4}) where T
292
+
function∇upsample_bilinear_whcn!(dx::AbstractArray{T,4}, Δ::AbstractArray{T,4}) where T
284
293
size(dx)[3:4] ==size(Δ)[3:4] ||error("Number of input and output channels and batches must match. Got input $(size(input)) and output $(size(output))")
285
294
in_w, in_h, channels, batches =size(dx)
286
295
@@ -312,7 +321,7 @@ function ∇upsample_linear_kernel!(dx::AbstractArray{T,4}, Δ::AbstractArray{T,
312
321
end
313
322
314
323
# trilinear
315
-
function∇upsample_linear_kernel!(dx::AbstractArray{T,5}, Δ::AbstractArray{T,5}) where T
324
+
function∇upsample_trilinear_whdcn!(dx::AbstractArray{T,5}, Δ::AbstractArray{T,5}) where T
316
325
size(dx)[4:5] ==size(Δ)[4:5] ||error("Number of input and output channels and batches must match. Got dx $(size(dx)) and Δ $(size(Δ))")
317
326
in_w, in_h, in_d, channels, batches =size(dx)
318
327
# treat batch and channel dimension as one for better parallelization granularity
0 commit comments