提交 e0b9af39 authored 作者: Frederic Bastien's avatar Frederic Bastien

reuse the size in the var instead of the hardcoded value.

上级 fb47b71e
...@@ -80,7 +80,7 @@ def run_conv_nnet1(shared_fn): ...@@ -80,7 +80,7 @@ def run_conv_nnet1(shared_fn):
shape_img = (n_batch, 1, 32, 32) shape_img = (n_batch, 1, 32, 32)
shape_kern = (n_kern, 1, 5, 5) shape_kern = (n_kern, 1, 5, 5)
logical_hid_shape = tcn.blas.GpuConv.logical_output_shape_2d((32,32),(5,5), 'valid') logical_hid_shape = tcn.blas.GpuConv.logical_output_shape_2d(shape_img[2:],shape_kern[2:], 'valid')
n_hid = n_kern * logical_hid_shape[0] * logical_hid_shape[1] n_hid = n_kern * logical_hid_shape[0] * logical_hid_shape[1]
n_out = 10 n_out = 10
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论