PReLU输出错误

danyanpi
Posts: 13
Joined: Thu Mar 23, 2023 3:02 am

PReLU输出错误

Postby danyanpi » Wed May 17, 2023 3:20 am

请问下,我这里自己训练的模型。conv2d出来没问题。经过PReLU,后大部分负数都变成了0.。请问下怎么排查饿

const static __attribute__((aligned(16))) int16_t _conv1_conv_activation_element[] = {
29358};

const static Activation<int16_t> _conv1_conv_activation(PReLU, _conv1_conv_activation_element, -16, {1,});
const Activation<int16_t> *get__conv1_conv_activation()
{
return &_conv1_conv_activation;
}

请教下这里面这几个参数是怎么算的?怎么变成斜率的? 经过这个了[ 250, -253, -3326, -267, -339, -2625, 6698, -446, -211, ...].变成了[ 250, 0, 0, 0, 0, 0, 6698, 0, -1, ......]..没看懂怎么变的

ESP_Junru
Posts: 49
Joined: Tue Jul 12, 2022 6:26 am

Re: PReLU输出错误

Postby ESP_Junru » Wed May 17, 2023 6:06 am

relu层会将负数都变成0

danyanpi
Posts: 13
Joined: Thu Mar 23, 2023 3:02 am

Re: PReLU输出错误

Postby danyanpi » Wed May 17, 2023 6:33 am

但我是PReLU饿

danyanpi
Posts: 13
Joined: Thu Mar 23, 2023 3:02 am

Re: PReLU输出错误

Postby danyanpi » Thu May 18, 2023 3:03 am

发现问题了。量化自动生成的激活函数里面有个参数shape of element。固定都是1了。但计算的时候不是。第N层取第N个element。但element这个数组只存了1个值,后面的都是0了或者随机数了
所以我的输出第一层都是对的。。后面负数基本都是0了

Who is online

Users browsing this forum: No registered users and 6 guests