Closed henbucuoshanghai closed 4 years ago
@henbucuoshanghai Hi. I'm not sure how to integrate Mish into TF slim. I'll have to give a check. Meanwhile, you can try integrating TF-Addon's Mish into the TF Slim architecture. Give me some time and I'll get back on this issue. Link to TFA implementation - https://github.com/tensorflow/addons/tree/master/tensorflow_addons/activations#contents
very Kind of you
@seanpmorgan @WindQAQ
Hi! So TF-Addons is for TF2.x and thus there is no support for the slim library (That was part of tf.contrib
and is no longer available in TF2).
I think the easiest way to implement it in your existing architecture (given that you have to use slim) would be to write a simple python ops version of mish that you could use:
def mish(inputs):
return inputs * tf.math.tanh(tf.math.softplus(inputs))
TF-Addons uses custom-op kernels for CPU/GPU that would give you a noticeable performance increase, but that is non-trival to incorporate into your code base (likely not worth the effort, but depends on your use case.)
@henbucuoshanghai hopefully, this solved your issue. Closing this as of now. Feell free to re-open.
slim.conv2d it is relu ,how to change it to mish?