@@ -99,7 +99,7 @@ function mean_pooling2d_bwd!(x::AbstractArray{T,4}, y::AbstractArray{T,4},
99
99
pooled_height:: Int , kernel_w:: Int , kernel_h:: Int , pad_w:: Int , pad_h:: Int ,
100
100
stride_w:: Int , stride_h:: Int ) where T
101
101
102
- x[:, :, :, :] = 0
102
+ x[:, :, :, :] . = 0
103
103
kernel_size = kernel_w * kernel_h
104
104
105
105
# pragma omp parallel for
@@ -112,7 +112,7 @@ function mean_pooling2d_bwd!(x::AbstractArray{T,4}, y::AbstractArray{T,4},
112
112
wstart = max (wstart, 0 ) + 1
113
113
114
114
oval = y[pw, ph, c, n] / kernel_size
115
- x[wstart: wend, hstart: hend, c, n] += oval
115
+ x[wstart: wend, hstart: hend, c, n] . += oval
116
116
end
117
117
end
118
118
@@ -263,7 +263,7 @@ function mean_pooling3d_bwd!(grad_input::AbstractArray{T,5}, grad_output::Abstra
263
263
hstart = max (hstart, 0 ) + 1
264
264
wstart = max (wstart, 0 ) + 1
265
265
266
- grad_input[wstart: wend, hstart: hend, dstart: dend, c, n] += grad_output[pw, ph, pd, c, n] / kernel_size
266
+ grad_input[wstart: wend, hstart: hend, dstart: dend, c, n] . += grad_output[pw, ph, pd, c, n] . / kernel_size
267
267
end
268
268
end
269
269
0 commit comments