Verified Commit 9dd38e1e authored by Max Ehrlich's avatar Max Ehrlich
Browse files

Remove explicit device

parent c7ce7cb8
......@@ -102,7 +102,7 @@ def S_i():
def B(shape, block_size):
blocks_shape = (shape[0] // block_size[0], shape[1] // block_size[1])
B_t = torch.zeros([shape[0], shape[1], blocks_shape[0], blocks_shape[1], block_size[0], block_size[1]], device=device, dtype=torch.float)
B_t = torch.zeros([shape[0], shape[1], blocks_shape[0], blocks_shape[1], block_size[0], block_size[1]], dtype=torch.float)
for s_x in range(shape[0]):
for s_y in range(shape[1]):
......@@ -111,6 +111,6 @@ def B(shape, block_size):
for i in range(block_size[0]):
for j in range(block_size[1]):
if x * block_size[0] + i == s_x and y * block_size[1] + j == s_y:
B_t[s_x, s_y, x, y, i ,j] = 1.0
B_t[s_x, s_y, x, y, i, j] = 1.0
return B_t
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment