pabloruizponce commited on
Commit
8b7bf6e
1 Parent(s): 14bd002

Update model.py

Browse files
Files changed (1) hide show
  1. model.py +1 -9
model.py CHANGED
@@ -26,7 +26,7 @@ class in2INModel(PreTrainedModel):
26
  self.model.eval()
27
  batch = OrderedDict({})
28
 
29
- batch["motion_lens"] = torch.zeros(1,1).long().cuda()
30
  batch["prompt_interaction"] = prompt_interaction
31
 
32
  if self.mode != "individual":
@@ -53,14 +53,6 @@ class in2INModel(PreTrainedModel):
53
  batch["text_individual2"] = [prompt_individual2]
54
 
55
  batch = self.model.forward_test(batch)
56
-
57
- if self.mode == "individual":
58
- motion_output = batch["output"][0].reshape(-1, 262)
59
- motion_output = self.normalizer.backward(motion_output.cpu().detach().numpy())
60
- joints3d = motion_output[:,:22*3].reshape(-1,22,3)
61
- joints3d = gaussian_filter1d(joints3d, 1, axis=0, mode='nearest')
62
- return joints3d
63
-
64
  motion_output_both = batch["output"][0].reshape(batch["output"][0].shape[0], 2, -1)
65
  motion_output_both = self.normalizer.backward(motion_output_both.cpu().detach().numpy())
66
 
 
26
  self.model.eval()
27
  batch = OrderedDict({})
28
 
29
+ batch["motion_lens"] = torch.zeros(1,1).long()
30
  batch["prompt_interaction"] = prompt_interaction
31
 
32
  if self.mode != "individual":
 
53
  batch["text_individual2"] = [prompt_individual2]
54
 
55
  batch = self.model.forward_test(batch)
 
 
 
 
 
 
 
 
56
  motion_output_both = batch["output"][0].reshape(batch["output"][0].shape[0], 2, -1)
57
  motion_output_both = self.normalizer.backward(motion_output_both.cpu().detach().numpy())
58