Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit f6f87aa

Browse files
committed
Fix RuntimeError: Caught RuntimeError in pin memory thread for device
0." ref #172
1 parent 0572a9e commit f6f87aa

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

‎train.py‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,8 +340,10 @@ def collate_fn(batch):
340340
s, e = 1, max_decoder_target_len + 1
341341
# if b_pad > 0:
342342
# s, e = s - 1, e - 1
343+
# NOTE: needs clone to supress RuntimeError in dataloarder...
344+
# ref: https://github.com/pytorch/pytorch/issues/10756
343345
frame_positions = torch.arange(s, e).long().unsqueeze(0).expand(
344-
len(batch), max_decoder_target_len)
346+
len(batch), max_decoder_target_len).clone()
345347

346348
# done flags
347349
done = np.array([_pad(np.zeros(len(x[1]) // r // downsample_step - 1),

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /