class_docstr: Mish: A Self Regularized Non-Monotonic Neural Activation Function - https://arxiv.org/abs/1908.08681
  Experimental memory-efficient variant
class_docstr_tok: ["Mish",":","A","Self","Regularized","Non-Monotonic","Neural","Activation","Function","-","https",":","\/\/arxiv.org\/abs\/1908.08681","Experimental","memory-efficient","variant"]
code: def backward(ctx, grad_output):
      x = ctx.saved_tensors[0]
      x_sigmoid = torch.sigmoid(x)
      x_tanh_sp = F.softplus(x).tanh()
      return grad_output.mul(
          x_tanh_sp + x * x_sigmoid * (1 - x_tanh_sp * x_tanh_sp)
      )
  
imports: import torch
  from torch import nn
  from torch.nn import functional
label_desc: Use image node_id 2 for calling the MishAutoFn obj's underlying member method code with example usage: obj.backward(ctx, grad_output) and returns: grad_output