cce8409beb4c1b662de2b9635cd723993184be23,torch_geometric/datasets/utils/faust_monet.py,,,#,28

Before Change


geo_path = os.path.join(root, "geodistances", "p=005_cs=010_ada=0")
patch_path = os.path.join(root, "patches_coord", "p=005_cs=010_ada=0")

file_path = os.path.join(patch_path, "tr_reg_000.mat")
out = read_matlab_sparse(file_path, "patch_coord")
rho = out[:, :out.shape[0]].tocoo()
theta = out[:, out.shape[0]:].tocoo()

row = torch.from_numpy(rho.row).long()
col = torch.from_numpy(rho.col).long()
rho = torch.from_numpy(rho.data)
theta = torch.from_numpy(theta.data)

index = torch.stack([row, col], dim=0)
value = torch.stack([rho, theta], dim=1)
adj = torch.sparse.FloatTensor(index, value, torch.Size([6890, 6890, 2]))

outputs = []
for i in range(0, 100):
    file_path = os.path.join(geo_path, "tr_reg_{:03d}.mat".format(i))

After Change



indices = []
values = []
slices = [0]
for i in range(80, 100):
    print(i)
    file_path = os.path.join(patch_path, "tr_reg_{:03d}.mat".format(i))
    out = read_matlab_sparse(file_path, "patch_coord")
    rho = out[:, :out.shape[0]].tocoo()
    theta = out[:, out.shape[0]:].tocoo()
    row = torch.from_numpy(rho.row).long()
    col = torch.from_numpy(rho.col).long()
    rho = torch.from_numpy(rho.data)
    theta = torch.from_numpy(theta.data)
    index = torch.stack([row, col], dim=0)
    value = torch.stack([rho, theta], dim=1)
    indices.append(index)
    values.append(value)
    slices.append(slices[-1] + index.size(1))

index = torch.cat(indices, dim=1)
value = torch.cat(values, dim=0)
slice = torch.LongTensor(slices)
torch.save((index, value, slice), os.path.join(root, "patch/test.pt"))

// outputs = []
// for i in range(0, 100):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: rusty1s/pytorch_geometric
Commit Name: cce8409beb4c1b662de2b9635cd723993184be23
Time: 2017-11-10
Author: matthias.fey@tu-dortmund.de
File Name: torch_geometric/datasets/utils/faust_monet.py
Class Name:
Method Name:


Project Name: PacktPublishing/Deep-Reinforcement-Learning-Hands-On
Commit Name: a0113631d7e9d6ec65531457ce03e06c902a4d0b
Time: 2017-10-17
Author: max.lapan@gmail.com
File Name: ch06/01_dqn_pong.py
Class Name:
Method Name:


Project Name: PacktPublishing/Deep-Reinforcement-Learning-Hands-On
Commit Name: 3bb0fd78af4f9dbddf7c01dde71844a283099650
Time: 2017-10-16
Author: max.lapan@gmail.com
File Name: ch06/01_dqn_pong.py
Class Name:
Method Name: