SetWeightShape

Function

Sets the shape of the weight matrix.

Prototype

1
bool SetWeightShape(int64_t cout, int64_t cin, int64_t d, int64_t h, int64_t w)

Parameters

Table 1 Parameters

Parameter

Input/Output

Description

cout

Input

The size of the output channel of the forward convolution, which is the same as the size of the GradOutput channel.

cin

Input

The size of the input channel of the forward convolution, which is the same as the size of the GradInput channel.

d

Input

The depth value of the weight.

h

Input

The height value of the weight.

w

Input

The width value of the weight.

Returns

true indicates that the setting is successful, and false indicates that the setting fails.

Restrictions

None

Example

1
2
3
auto ascendcPlatform = platform_ascendc::PlatformAscendCManager::GetInstance();
ConvBackpropApi::Conv3DBpInputTiling con3dBpDxTiling(*ascendcPlatform);
con3dBpDxTiling.SetWeightShape(cout, cin, d, h, w);