MCPcopy Create free account
hub / github.com/OpenDriveLab/TCP / log_prob

Method log_prob

roach/models/distributions.py:224–226  ·  view source on GitHub ↗
(self, actions: th.Tensor)

Source from the content-addressed store, hash-verified

222 return self
223
224 def log_prob(self, actions: th.Tensor) -> th.Tensor:
225 log_prob = self.distribution.log_prob(actions)
226 return sum_independent_dims(log_prob)
227
228 def entropy_loss(self) -> th.Tensor:
229 entropy_loss = -1.0 * self.distribution.entropy()

Callers 4

evaluate_actionsMethod · 0.45
forwardMethod · 0.45
log_probMethod · 0.45
log_probMethod · 0.45

Calls 1

sum_independent_dimsFunction · 0.85

Tested by

no test coverage detected