这个提交包含在:
Zipeng Fu
2023-10-23 19:33:15 -04:00
父节点 b37712fd2f
当前提交 89cea60069
共有 6 个文件被更改,包括 29 次插入 和 19 次删除

查看文件

@ -71,7 +71,7 @@ class DETRVAE(nn.Module):
self.encoder_action_proj = nn.Linear(14, hidden_dim) # project action to embedding
self.encoder_joint_proj = nn.Linear(14, hidden_dim) # project qpos to embedding
print('Use VQ: ', self.vq)
print(f'Use VQ: {self.vq}, {self.vq_class}, {self.vq_dim}')
if self.vq:
self.latent_proj = nn.Linear(hidden_dim, self.vq_class * self.vq_dim)
else:
@ -121,6 +121,7 @@ class DETRVAE(nn.Module):
latent_input = self.latent_out_proj(straigt_through)
mu = logvar = None
else:
probs = binaries = None
mu = latent_info[:, :self.latent_dim]
logvar = latent_info[:, self.latent_dim:]
latent_sample = reparametrize(mu, logvar)