addRowwise static method
Implementation
static Tensor2D addRowwise(Tensor2D a, Float64List bias) {
if (a.cols != bias.length) {
throw ArgumentError('addRowwise: bias len != a.cols');
}
final out = a.clone();
for (var i = 0; i < a.rows; i++) {
final base = i * a.cols;
for (var j = 0; j < a.cols; j++) {
out.data[base + j] += bias[j];
}
}
return out;
}