Struct std::RocmConv2D
struct RocmConv2D {
struct RocmBuf weight;
struct RocmBuf bias;
unsigned long inChannels;
unsigned long outChannels;
unsigned long kH;
unsigned long kW;
unsigned long stride;
unsigned long padding;
}A Conv2D (cnn.h) whose weight [outC, inC, kH, kW] and bias [outC] live on the GPU. weight.dev == 0 if the upload failed.
Fields
Methods
§
int forward(
struct RocmBuf x,
struct RocmBuf y,
unsigned long batch,
unsigned long height,
unsigned long width,
) constsource · definition§
int forward_relu(
struct RocmBuf x,
struct RocmBuf y,
unsigned long batch,
unsigned long height,
unsigned long width,
) constsource · definitiony = relu(conv(x) + bias).