Closed henbucuoshanghai closed 2 years ago
tnn input : scale * input + bias If I remember correctly, the fourth is alpha You need to view how the corresponding training model handles the input during training
tks I know scale * input + bias. the fourth is alpha?means?
when my input is five dims,I need five bias and scales??
rgba
我的数据不是图片,是自定义数组,五维的。 数组已经确认过没问题,py版本直接测试即可,但是传入tnn后,结果不对,请问scale和bias怎么设置呢
该项目示例适合使用以下步骤: https://github.com/cmdbug/TNN_Demo/issues/1 其它方式需要自己改写后处理。 scale/bias是与你训练模型的输入有关。比如你训练模型输入是0-1的值,那么你在tnn的转换后的输入也应该是0-1。
热心的回复,项目跑通了,厉害的项目。感谢! 模型输入是01之间,已经统统处理好了,存为数组;现在数组传进tnn,bias是1,scale是0?但是结果不对。。请问熟悉吗?
如果已经处理了,那也应该是 scale 是 1,bias 是 0
该项目是 4 维输入,请认真看 https://github.com/cmdbug/TNN_Demo/issues/1 说明过程,否则请自行改本项目的后处理。
tks 热心的回复
你好 回复rgba 是什么意思呢? 自己的数据必须unsigned 变成数组 传进tnn?
input_cvt_param.scale = {1.0 / 255, 1.0 / 255, 1.0 / 255, 0.0}; input_cvt_param.bias = {0.0, 0.0, 0.0, 0.0}; 4个参数是 rgba
明白明白 多谢, 那输入不是图像,五维的,怎么办呢?,试了很多bias,scale,结果总是对不上。。不知道怎么回事
我输入都是rgba的4维图像,不是图像还是5维的就不懂了,建议去tnn问。
多谢多谢明白,我去官方问问。感激!
input_cvt_param.scale = {1.0 / 255, 1.0 / 255, 1.0 / 255, 0.0}; input_cvt_param.bias = {0.0, 0.0, 0.0, 0.0}; why scale is 1/255 ,and the last is 0.0? bias is ?