Skip to content

Commit

Permalink
Don't reshape empty weights
Browse files Browse the repository at this point in the history
  • Loading branch information
klarh committed Mar 4, 2021
1 parent 3aa6135 commit 5a8fad8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion keras_gtar/trajectory.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ def get_weights(self, frame=-1):
shape_rec = shape_records[i][weight_index]
shape = self.handle.getRecord(shape_rec, frame_index)
weight = self.handle.getRecord(weight_rec, frame_index)
weight = weight.reshape(shape)
if weight.size:
weight = weight.reshape(shape)
all_weights.append(weight)

return all_weights
Expand Down

0 comments on commit 5a8fad8

Please sign in to comment.