$darkmode
A high-performance general-purpose compute library
ml.h
Go to the documentation of this file.
1 /*******************************************************
2  * Copyright (c) 2018, ArrayFire
3  * All rights reserved.
4  *
5  * This file is distributed under 3-clause BSD license.
6  * The complete license agreement can be obtained at:
7  * http://arrayfire.com/licenses/BSD-3-Clause
8  ********************************************************/
9 
10 #pragma once
11 #include <af/defines.h>
12 
13 #ifdef __cplusplus
14 namespace af
15 {
16 class array;
17 class dim4;
18 
19 #if AF_API_VERSION >= 37
20 
43  AFAPI array convolve2GradientNN(const array& incoming_gradient,
44  const array& original_signal,
45  const array& original_filter,
46  const array& convolved_output,
47  const dim4 stride, const dim4 padding, const dim4 dilation,
48  convGradientType grad_type);
49 
50 #endif
51 
52 }
53 #endif
54 
55 #ifdef __cplusplus
56 extern "C" {
57 #endif
58 
59 #if AF_API_VERSION >= 37
60 
85  const af_array incoming_gradient,
86  const af_array original_signal,
87  const af_array original_filter,
88  const af_array convolved_output,
89  const unsigned stride_dims, const dim_t *strides,
90  const unsigned padding_dims, const dim_t *paddings,
91  const unsigned dilation_dims, const dim_t *dilations,
92  af_conv_gradient_type grad_type);
93 #endif
94 
95 
96 #ifdef __cplusplus
97 }
98 #endif
Definition: algorithm.h:14
af_err
Definition: defines.h:71
AFAPI array convolve2GradientNN(const array &incoming_gradient, const array &original_signal, const array &original_filter, const array &convolved_output, const dim4 stride, const dim4 padding, const dim4 dilation, convGradientType grad_type)
C++ interface for calculating backward pass gradient of 2D convolution This function calculates the g...
af_conv_gradient_type
Definition: defines.h:542
long long dim_t
Definition: defines.h:56
af_conv_gradient_type convGradientType
Definition: defines.h:603
#define AFAPI
Definition: defines.h:38
static af::array array(af::dim4 idims, cl_mem buf, af::dtype type, bool retain=false)
Create an af::array object from an OpenCL cl_mem buffer
Definition: opencl.h:330
void * af_array
Definition: defines.h:240
AFAPI af_err af_convolve2_gradient_nn(af_array *out, const af_array incoming_gradient, const af_array original_signal, const af_array original_filter, const af_array convolved_output, const unsigned stride_dims, const dim_t *strides, const unsigned padding_dims, const dim_t *paddings, const unsigned dilation_dims, const dim_t *dilations, af_conv_gradient_type grad_type)
C interface for calculating backward pass gradient of 2D convolution This function calculates the gra...