MCPcopy Create free account
hub / github.com/NVlabs/CTG / conditional_sample

Method conditional_sample

tbsim/models/diffuser.py:997–1002  ·  view source on GitHub ↗
(self, data_batch, horizon=None, num_samp=1, class_free_guide_w=0.0, **kwargs)

Source from the content-addressed store, hash-verified

995
996 @torch.no_grad()
997 def conditional_sample(self, data_batch, horizon=None, num_samp=1, class_free_guide_w=0.0, **kwargs):
998 batch_size = data_batch['history_positions'].size()[0]
999 horizon = horizon or self.horizon
1000 shape = (batch_size, num_samp, horizon, self.transition_dim)
1001
1002 return self.p_sample_loop(shape, data_batch, num_samp, class_free_guide_w=class_free_guide_w, **kwargs)
1003
1004 #------------------------------------------ training ------------------------------------------#
1005

Callers 1

forwardMethod · 0.95

Calls 1

p_sample_loopMethod · 0.95

Tested by

no test coverage detected