(beta)torch_npu.contrib.module.Focus
产品支持情况
| 产品 | 是否支持 |
|---|---|
| [object Object]Atlas A3 训练系列产品[object Object] | √ |
| [object Object]Atlas A2 训练系列产品[object Object] | √ |
| [object Object]Atlas 推理系列产品[object Object] | √ |
| [object Object]Atlas 训练系列产品[object Object] | √ |
功能说明
使用NPU亲和写法替换YOLOv5中的原生Focus。
函数原型
[object Object]
参数说明
计算参数
- c1 (
int):输入图像中的通道数。 - c2 (
int):卷积产生的通道数。 - k (
int):卷积核大小,默认值为1。 - s (
int):卷积步长,默认值为1。 - p (
int):填充。 - g (
int):从输入通道到输出通道的分组数,默认值为1。 - act (
bool):是否使用激活函数,默认值为True。
计算输入
- x(
Tensor): 输入张量。
返回值说明
Tensor
Focus计算结果。
调用示例
[object Object]