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

Method decoder_wrapper

tbsim/models/base_models.py:1211–1218  ·  view source on GitHub ↗
(controls)

Source from the content-addressed store, hash-verified

1209 if self.dyn is not None:
1210 if with_guidance:
1211 def decoder_wrapper(controls):
1212 # TBD: hack on compatible with both BITS and BC
1213 if len(current_states.shape) == 3:
1214 current_states_join = TensorUtils.join_dimensions(current_states, 0, 2)
1215 else:
1216 current_states_join = current_states
1217 trajectories, _ = self._forward_dynamics(current_states=current_states_join, actions=controls)
1218 return trajectories
1219 # TBD: hack on compatible with both BITS and BC
1220 if len(preds["trajectories"].shape) == 4:
1221 preds_trajectories_join = TensorUtils.join_dimensions(preds["trajectories"], 0, 2) # [B*N, T, 3]

Callers

nothing calls this directly

Calls 1

_forward_dynamicsMethod · 0.95

Tested by

no test coverage detected