diff --git a/theano/tensor/nnet/abstract_conv.py b/theano/tensor/nnet/abstract_conv.py index d2ac0a6d062..406e6b3a7a1 100644 --- a/theano/tensor/nnet/abstract_conv.py +++ b/theano/tensor/nnet/abstract_conv.py @@ -6,7 +6,10 @@ import logging from six import reraise, integer_types import sys -from fractions import gcd +try: + from math import gcd +except ImportError: + from fractions import gcd import theano