修复BUG

This commit is contained in:
zhiyang7 2021-12-23 11:40:46 +08:00
parent 32718bbe12
commit 69accd5f61
1 changed files with 1 additions and 1 deletions

View File

@ -516,7 +516,7 @@ def forward_logic(self_model, position, z, x, return_value=False, flags=None):
for i in range(partition_count): for i in range(partition_count):
model = self_model.models[position] model = self_model.models[position]
model_out = model.forward(sub_z[i], sub_x[i])['values'] model_out = model.forward(sub_z[i], sub_x[i])['values']
values[j:j+len(sub_z[i])] = model_out values[j:j+len(sub_z[i])] = model_out.cpu().detach().numpy()
j += len(sub_z[i]) j += len(sub_z[i])
else: else:
model = self_model.models[position] model = self_model.models[position]