tools, lockfile, deps

This commit is contained in:
Jan Kowalczyk
2025-08-13 14:17:12 +02:00
parent cd4dc583e8
commit ef311d862e
17 changed files with 4325 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
def calculate_conv_dimensions(W_in, H_in, K, S, P):
"""
Calculate the output dimensions of a convolutional layer.
Parameters:
W_in (int): Width of the input image
H_in (int): Height of the input image
K (int): Size of the filter (assumed to be square)
S (int): Stride
P (int): Padding
Returns:
(int, int): Width and height of the output activation map
"""
W_out = (W_in - K + (2 * P)) / S + 1
H_out = (H_in - K + (2 * P)) / S + 1
return W_out, H_out
print(f"w, h = {calculate_conv_dimensions(W_in=2048, H_in=32, K=11, S=4, P=2)=}")
# w, h = calculate_conv_dimensions(W_in=2048, H_in=32, K=11, S=4, P=2)
# print(f"{calculate_conv_dimensions(W_in=w, H_in=h, K=11, S=4, P=2)=}")