Skip to content

Commit

Permalink
init as zeros, avoid overflow
Browse files Browse the repository at this point in the history
  • Loading branch information
DandilionLau committed Oct 6, 2019
1 parent 40b52e4 commit 19b7c25
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mlfromscratch/deep_learning/layers.py
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,7 @@ def column_to_image(cols, images_shape, filter_shape, stride, output_shape='same
pad_h, pad_w = determine_padding(filter_shape, output_shape)
height_padded = height + np.sum(pad_h)
width_padded = width + np.sum(pad_w)
images_padded = np.empty((batch_size, channels, height_padded, width_padded))
images_padded = np.zeros((batch_size, channels, height_padded, width_padded))

# Calculate the indices where the dot products are applied between weights
# and the image
Expand Down

0 comments on commit 19b7c25

Please # to comment.