Skip to content

Commit 1319ea3

Browse files
Anna MeyerAnna Meyer
authored andcommitted
Remove call to detach() on a numpy array
Signed-off-by: Anna Meyer <[email protected]>
1 parent 020280c commit 1319ea3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

art/estimators/regression/pytorch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ def predict( # pylint: disable=W0221
269269
output = model_outputs[-1]
270270
output = output.detach().cpu().numpy().astype(np.float32)
271271
if len(output.shape) == 1:
272-
output = np.expand_dims(output.detach().cpu().numpy(), axis=1).astype(np.float32)
272+
output = np.expand_dims(output, axis=1).astype(np.float32)
273273

274274
results_list.append(output)
275275

0 commit comments

Comments
 (0)