提交 f838f93e authored 作者: Arnaud Bergeron's avatar Arnaud Bergeron

Fix new instance of 'int' in abstract_conv.

上级 c5e4c593
......@@ -238,17 +238,17 @@ def conv2d_grad_wrt_inputs(output_grad,
# checking the type of input_shape
for dim in [0, 1]:
assert isinstance(input_shape[dim], (theano.tensor.TensorConstant,
int, type(None)))
integer_types, type(None)))
for dim in [2, 3]:
assert isinstance(input_shape[dim], (theano.tensor.TensorVariable,
theano.tensor.TensorConstant,
int))
integer_types))
# checking the type of filter_shape
if filter_shape is not None:
for dim in [0, 1, 2, 3]:
assert isinstance(filter_shape[dim], (theano.tensor.TensorConstant,
int, type(None)))
integer_types, type(None)))
# setting the last two dimensions of input_shape to None, if
# the type of these dimensions is TensorVariable.
......@@ -361,17 +361,17 @@ def conv2d_grad_wrt_weights(input,
# checking the type of filter_shape
for dim in [0, 1]:
assert isinstance(filter_shape[dim], (theano.tensor.TensorConstant,
int, type(None)))
integer_types, type(None)))
for dim in [2, 3]:
assert isinstance(filter_shape[dim], (theano.tensor.TensorVariable,
theano.tensor.TensorConstant,
int))
integer_types))
# checking the type of input_shape
if input_shape is not None:
for dim in [0, 1, 2, 3]:
assert isinstance(input_shape[dim], (theano.tensor.TensorConstant,
int, type(None)))
integer_types, type(None)))
# setting the last two dimensions of filter_shape to None, if
# the type of these dimensions is TensorVariable.
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论