Spaces:
Sleeping
Sleeping
edit cube init method
Browse files- src/rubik/cube.py +1 -1
src/rubik/cube.py
CHANGED
@@ -29,7 +29,7 @@ class Cube:
|
|
29 |
"""
|
30 |
tensor = build_cube_tensor(colors, size)
|
31 |
self.coordinates = tensor.indices().transpose(0, 1).to(torch.int16)
|
32 |
-
self.state = F.one_hot(tensor.values().long()).to(torch.int16)
|
33 |
self.actions = build_actions_tensor(size)
|
34 |
self.history: list[list[int]] = []
|
35 |
self.colors = colors
|
|
|
29 |
"""
|
30 |
tensor = build_cube_tensor(colors, size)
|
31 |
self.coordinates = tensor.indices().transpose(0, 1).to(torch.int16)
|
32 |
+
self.state = F.one_hot(tensor.values().long(), num_classes=7).to(torch.int16)
|
33 |
self.actions = build_actions_tensor(size)
|
34 |
self.history: list[list[int]] = []
|
35 |
self.colors = colors
|