Created
February 24, 2017 12:59
-
-
Save okumura/b989e1d6c68762d2614bd0c45d96f150 to your computer and use it in GitHub Desktop.
get_conv_outsize_2d()
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
# -*- coding: utf-8 -*- | |
from chainer.links.connection.convolution_2d import _pair | |
from chainer.utils.conv import get_conv_outsize | |
def get_conv_outsize_2d(size, k, s, p=0, cover_all=False, d=1): | |
sizeh, sizew = _pair(size) | |
kh, kw = _pair(k) | |
sh, sw = _pair(s) | |
ph, pw = _pair(p) | |
h = get_conv_outsize(sizeh, kh, sh, ph, cover_all, d) | |
w = get_conv_outsize(sizew, kw, sw, pw, cover_all, d) | |
return h, w |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment