Spaces:
Runtime error
Runtime error
Update models/interactive_model.py
Browse files
models/interactive_model.py
CHANGED
|
@@ -73,7 +73,7 @@ class BezierColorBranch(nn.Module):
|
|
| 73 |
|
| 74 |
def create_control_points(self, x):
|
| 75 |
x = torch.cumsum(torch.cat([torch.zeros_like(x[..., :1]), x], dim=-1), dim=-1)
|
| 76 |
-
x = torch.stack([x, torch.linspace(0, 1, steps=self.num_control_points+1).unsqueeze(0).repeat(x.shape[0], x.shape[1], 1).
|
| 77 |
return x
|
| 78 |
|
| 79 |
def forward(self, x):
|
|
|
|
| 73 |
|
| 74 |
def create_control_points(self, x):
|
| 75 |
x = torch.cumsum(torch.cat([torch.zeros_like(x[..., :1]), x], dim=-1), dim=-1)
|
| 76 |
+
x = torch.stack([x, torch.linspace(0, 1, steps=self.num_control_points+1).unsqueeze(0).repeat(x.shape[0], x.shape[1], 1).to(x.device())], dim=-1)
|
| 77 |
return x
|
| 78 |
|
| 79 |
def forward(self, x):
|