Пример #1
0
 def wrapped(*args, **kwargs):
   fun = f
   if plate is not None:
     fun = plate_util.make_plate(fun, name=plate)
   if name is not None:
     return random_variable(nest(fun, scope=name)(*args, **kwargs), name=name)
   return fun(*args, **kwargs)
Пример #2
0
 def transform(f: Program) -> Program:
     return plate_util.make_plate(f, name=name)