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
149
+
functionupsample_linear_wcn!(output::AbstractArray{T,3}, input::AbstractArray{T,3}) where T
139
150
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
151
in_w, channels, batches =size(input)
141
152
# treat batch and channel dimension as one for better parallelization granularity
@@ -161,7 +172,7 @@ end
161
172
162
173
# bilinear
163
174
# linearly upsamples first two dims of 4D array
164
-
functionupsample_linear_kernel!(output::AbstractArray{T,4}, input::AbstractArray{T,4}) where T
175
+
functionupsample_bilinear_whcn!(output::AbstractArray{T,4}, input::AbstractArray{T,4}) where T
165
176
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
177
in_w, in_h, channels, batches =size(input)
167
178
# treat batch and channel dimension as one for better parallelization granularity
@@ -194,7 +205,7 @@ end
194
205
195
206
# trilinear
196
207
# linearly upsamples first three dims of 5D array
197
-
functionupsample_linear_kernel!(output::AbstractArray{T,5}, input::AbstractArray{T,5}) where T
208
+
functionupsample_trilinear_whdcn!(output::AbstractArray{T,5}, input::AbstractArray{T,5}) where T
198
209
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
210
in_w, in_h, in_d, channels, batches =size(input)
200
211
# treat batch and channel dimension as one for better parallelization granularity
@@ -254,7 +265,7 @@ function ∇upsample_linear(Δ::AbstractArray{T,N}; size::NTuple{<:Any,Integer})
254
265
end
255
266
256
267
# linear
257
-
function∇upsample_linear_kernel!(dx::AbstractArray{T,3}, Δ::AbstractArray{T,3}) where T
268
+
function∇upsample_linear_wcn!(dx::AbstractArray{T,3}, Δ::AbstractArray{T,3}) where T
258
269
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
270
in_w, channels, batches =size(dx)
260
271
@@ -280,7 +291,7 @@ function ∇upsample_linear_kernel!(dx::AbstractArray{T,3}, Δ::AbstractArray{T,
280
291
end
281
292
282
293
# bilinear
283
-
function∇upsample_linear_kernel!(dx::AbstractArray{T,4}, Δ::AbstractArray{T,4}) where T
294
+
function∇upsample_bilinear_whcn!(dx::AbstractArray{T,4}, Δ::AbstractArray{T,4}) where T
284
295
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
296
in_w, in_h, channels, batches =size(dx)
286
297
@@ -312,7 +323,7 @@ function ∇upsample_linear_kernel!(dx::AbstractArray{T,4}, Δ::AbstractArray{T,
312
323
end
313
324
314
325
# trilinear
315
-
function∇upsample_linear_kernel!(dx::AbstractArray{T,5}, Δ::AbstractArray{T,5}) where T
326
+
function∇upsample_trilinear_whdcn!(dx::AbstractArray{T,5}, Δ::AbstractArray{T,5}) where T
316
327
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
328
in_w, in_h, in_d, channels, batches =size(dx)
318
329
# treat batch and channel dimension as one for better parallelization granularity
0 commit comments