This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the page.


Convolution weight function


Z = convwf(W,P)
dim = convwf('size',S,R,FP)
dw = convwf('dw',W,P,Z,FP)
info = convwf('code')


Weight functions apply weights to an input to get weighted inputs.

Z = convwf(W,P) returns the convolution of a weight matrix W and an input P.

dim = convwf('size',S,R,FP) takes the layer dimension S, input dimension R, and function parameters, and returns the weight size.

dw = convwf('dw',W,P,Z,FP) returns the derivative of Z with respect to W.

info = convwf('code') returns information about this function. The following codes are defined:


Name of derivative function


Reduced derivative = 2, full derivative = 1, linear derivative = 0


Input: reduced derivative = 2, full derivative = 1, linear derivative = 0


Weight: reduced derivative = 2, full derivative = 1, linear derivative = 0


Full name


Returns names of function parameters


Returns default function parameters


Here you define a random weight matrix W and input vector P and calculate the corresponding weighted input Z.

W = rand(4,1);
P = rand(8,1);
Z = convwf(W,P)

Network Use

To change a network so an input weight uses convwf, set net.inputWeights{i,j}.weightFcn to 'convwf'. For a layer weight, set net.layerWeights{i,j}.weightFcn to 'convwf'.

In either case, call sim to simulate the network with convwf.

Introduced in R2006a

Was this topic helpful?