284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
|
# File 'lib/tensor_stream/math_gradients.rb', line 284
def self._Conv2DGrad(op, grad)
strides = op.options[:strides]
padding = op.options[:padding]
use_cudnn_on_gpu = op.options[:use_cudnn_on_gpu]
data_format = op.options[:data_format]
shape_0, shape_1 = ts.shape_n([op.inputs[0], op.inputs[1]])
[
_op(:conv2d_backprop_input,
shape_0,
op.inputs[1],
grad,
strides: strides,
padding: padding,
use_cudnn_on_gpu: use_cudnn_on_gpu,
data_format: data_format),
_op(:conv2d_backprop_filter,
op.inputs[0],
shape_1,
grad,
strides: strides,
padding: padding,
use_cudnn_on_gpu: use_cudnn_on_gpu,
data_format: data_format),
]
end
|