[英]label smoothing for inception v3 network
In inception v3 paper they discussed about label smoothing
but in (keras code) here there is nothing mention about label smoothing.在inception v3论文中,他们讨论了
label smoothing
但在(keras 代码)中, 这里没有提及标签平滑。 How to write code for label smoothing for inception v3 network.如何为 inception v3 网络编写标签平滑代码。 It is suggested that it should be included in loss function.
建议将其包含在损失函数中。 i am using
categorical crossentropy
loss function.我正在使用
categorical crossentropy
损失函数。 So how to make custom categorical crossentropy
for label smoothing.那么如何为标签平滑制作自定义
categorical crossentropy
。
You can pass a label_smoothing
parameter to the function CategoricalCrossentropy for label smoothing.您可以将
label_smoothing
参数传递给函数CategoricalCrossentropy以进行标签平滑。
import tensorflow as tf
# when compiling the model
model.compile('sgd', loss=tf.keras.losses.CategoricalCrossentropy(label_smoothing=0.1))
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.