예제 #1
0
 def output(x, **kwargs):
     out = f(params, x, **kwargs)
     masked_output = utils.get_masked_array(out)
     return utils.nt_tree_fn()(lambda x: x.masked_value)(masked_output)
예제 #2
0
 def output(x, **kwargs):
   out = f(params, x, **kwargs)
   masked_output = utils.get_masked_array(out)
   return masked_output.masked_value
예제 #3
0
 def _f(p):
   out = f(p, x, **apply_fn_kwargs)
   # TODO(romann): normalize properly if output is masked.
   out = utils.get_masked_array(out)
   return out.masked_value
예제 #4
0
 def output(x, rng):
   out = f(params, x, rng=rng, **apply_fn_kwargs)
   masked_output = utils.get_masked_array(out)
   return masked_output.masked_value