Created
July 25, 2020 05:43
-
-
Save mohcinemadkour/ea440f48970e17edc0456208d9697179 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def caloutdim(hin, kernel_size, stride=1, padding=0, dilation=1): | |
return int(np.floor((hin+2*padding-dilation*(kernel_size-1)-1)/stride+1)) | |
d = [28] | |
d.append(caloutdim(d[-1], 5, padding=2)) | |
d.append(caloutdim(d[-1], 2, 2)) | |
d.append(caloutdim(d[-1], 5, padding=2)) | |
d.append(caloutdim(d[-1], 2, 2)) | |
print(d) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment