Skip to content

Commit

Permalink
fixes pvector when bias is none
Browse files Browse the repository at this point in the history
  • Loading branch information
tfjgeorge committed Nov 24, 2023
1 parent 9fb8780 commit 985b443
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nngeometry/object/vector.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ def _dict_to_flat(self):
parts = []
for layer_id, layer in self.layer_collection.layers.items():
parts.append(self.dict_repr[layer_id][0].view(-1))
if len(self.dict_repr[layer_id]) > 1:
if layer.bias:
parts.append(self.dict_repr[layer_id][1].view(-1))
return torch.cat(parts)

Expand Down

0 comments on commit 985b443

Please sign in to comment.