test
Browse files
app.py
CHANGED
@@ -164,10 +164,10 @@ class DynamicsVisualizer:
|
|
164 |
cfg.sim.uniform = True
|
165 |
cfg.sim.use_pv = False
|
166 |
|
167 |
-
|
168 |
|
169 |
self.cfg = cfg
|
170 |
-
|
171 |
self.k_rel = 8 # knn for relations
|
172 |
self.k_wgt = 16 # knn for weights
|
173 |
self.with_bg = True
|
@@ -180,7 +180,7 @@ class DynamicsVisualizer:
|
|
180 |
seed = cfg.seed
|
181 |
random.seed(seed)
|
182 |
np.random.seed(seed)
|
183 |
-
|
184 |
# torch.autograd.set_detect_anomaly(True)
|
185 |
# torch.backends.cudnn.benchmark = True
|
186 |
|
@@ -926,11 +926,6 @@ class DynamicsVisualizer:
|
|
926 |
@spaces.GPU
|
927 |
def reset(self):
|
928 |
import warp as wp
|
929 |
-
|
930 |
-
device = torch.device('cuda:0')
|
931 |
-
self.device = device
|
932 |
-
torch.manual_seed(self.cfg.seed)
|
933 |
-
|
934 |
wp.init()
|
935 |
gpus = [int(gpu) for gpu in self.cfg.gpus]
|
936 |
wp_devices = [wp.get_device(f'cuda:{gpu}') for gpu in gpus]
|
|
|
164 |
cfg.sim.uniform = True
|
165 |
cfg.sim.use_pv = False
|
166 |
|
167 |
+
device = torch.device('cuda')
|
168 |
|
169 |
self.cfg = cfg
|
170 |
+
self.device = device
|
171 |
self.k_rel = 8 # knn for relations
|
172 |
self.k_wgt = 16 # knn for weights
|
173 |
self.with_bg = True
|
|
|
180 |
seed = cfg.seed
|
181 |
random.seed(seed)
|
182 |
np.random.seed(seed)
|
183 |
+
torch.manual_seed(seed)
|
184 |
# torch.autograd.set_detect_anomaly(True)
|
185 |
# torch.backends.cudnn.benchmark = True
|
186 |
|
|
|
926 |
@spaces.GPU
|
927 |
def reset(self):
|
928 |
import warp as wp
|
|
|
|
|
|
|
|
|
|
|
929 |
wp.init()
|
930 |
gpus = [int(gpu) for gpu in self.cfg.gpus]
|
931 |
wp_devices = [wp.get_device(f'cuda:{gpu}') for gpu in gpus]
|