Skip to content

Commit a187633

Browse files
authored
Update data.lua
1 parent f81dc19 commit a187633

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/data/MSRA/data.lua

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,16 +125,19 @@ function load_data(db_type)
125125
for line in io.lines(center_dir .. "center_train_" .. tostring(test_model) .. "_refined.txt") do
126126
table.insert(RefPt_,line)
127127
end
128+
jointWorld = torch.Tensor(trainSz,jointNum,worldDim):zero()
129+
RefPt = torch.Tensor(trainSz,worldDim):zero()
128130
elseif db_type == "test" then
129131
print("testing data loading...")
130132
RefPt_ = {}
131133
for line in io.lines(center_dir .. "center_test_" .. tostring(test_model) .. "_refined.txt") do
132134
table.insert(RefPt_,line)
133135
end
136+
jointWorld = torch.Tensor(testSz,jointNum,worldDim):zero()
137+
RefPt = torch.Tensor(testSz,worldDim):zero()
134138
end
135139

136-
jointWorld = torch.Tensor(trainSz,jointNum,worldDim):zero()
137-
RefPt = torch.Tensor(trainSz,worldDim):zero()
140+
138141
name = {}
139142

140143
fileId = 1

0 commit comments

Comments
 (0)