def deconvoluter(params_fn, specstr, shape):
input_var = T.tensor4('input')
decnet = build_deconv_net(input_var, shape=shape, specstr=specstr)
u.load_params(decnet, params_fn)
return theano.function([input_var], nn.layers.get_output(decnet))
# builds a CAE and returns functions to go from image space to the layer denoted by
# layersplit, and from that layer back to images. However, the second function only
# works correctly if layersplit='encode', due to the structure of the Lasagne layer
# implementation, so if we split on a different layer then it is necessary to
# build a separate function for going from conv-space to images.
评论列表
文章目录