Skip to content

Commit

Permalink
Fix use_batch_norm error
Browse files Browse the repository at this point in the history
  • Loading branch information
takuseno committed Jan 18, 2024
1 parent ee65b1f commit 11adcee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions d3rlpy/models/torch/encoders.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,8 +282,8 @@ def compute_output_size(
inputs = []
for shape in input_shapes:
if isinstance(shape[0], (list, tuple)):
inputs.append([torch.rand(1, *s, device=device) for s in shape])
inputs.append([torch.rand(2, *s, device=device) for s in shape])
else:
inputs.append(torch.rand(1, *shape, device=device))
inputs.append(torch.rand(2, *shape, device=device))
y = encoder(*inputs)
return int(y.shape[1])

0 comments on commit 11adcee

Please sign in to comment.