docstr: Compute the true load per expert, given the gates.
  The load is the number of examples for which the corresponding gate is >0.
  Args:
  gates: a `Tensor` of shape [batch_size, n]
  Returns:
  a float32 `Tensor` of shape [n]
docstr_tok: ["Compute","the","true","load","per","expert",",","given","the","gates",".","The","load","is","the","number","of","examples","for","which","the","corresponding","gate","is",">","0",".","Args",":","gates",":","a","`","Tensor","`","of","shape","[","batch_size",",","n","]","Returns",":","a","float32","`","Tensor","`","of","shape","[","n","]"]
code: def _gates_to_load(self, gates):
      """Compute the true load per expert, given the gates.
      The load is the number of examples for which the corresponding gate is >0.
      Args:
      gates: a `Tensor` of shape [batch_size, n]
      Returns:
      a float32 `Tensor` of shape [n]
      """
      return (gates > 0).sum(0)
  
file_path: thu-pacman-faster-moe/fmoe/gates/noisy_gate.py
imports: from .base_gate import BaseGate
  import torch
  import torch.nn
  import torch.nn.functional
  from torch.distributions.normal import Normal
  import math
label_desc: Use image node_id 3 for calling the NoisyGate obj's underlying member method code with example usage: obj._gates_to_load(gates) and returns: unknown