--- theano/tensor/nnet/corr3d.py.orig 2020-07-27 10:09:29.000000000 -0600
+++ theano/tensor/nnet/corr3d.py 2020-08-07 09:22:58.269099242 -0600
@@ -225,11 +225,10 @@ class BaseCorr3dMM(gof.OpenMPOp):
sub['blas_get_num_threads'] = '0'
files = [os.path.join('c_code', 'corr3d_gemm.c')]
- codes = [open(os.path.join(os.path.split(__file__)[0], f)).read()
- for f in files]
final_code = ''
- for code in codes:
- final_code += code
+ for f in files:
+ with open(os.path.join(os.path.split(__file__)[0], f)) as fil:
+ final_code += fil.read()
return final_code % sub
def c_code_helper(self, bottom, weights, top, sub,
--- theano/tensor/nnet/corr.py.orig 2020-07-27 10:09:29.000000000 -0600
+++ theano/tensor/nnet/corr.py 2020-08-07 09:23:51.893131939 -0600
@@ -240,11 +240,10 @@ class BaseCorrMM(gof.OpenMPOp):
sub['blas_get_num_threads'] = '0'
files = [os.path.join('c_code', 'corr_gemm.c')]
- codes = [open(os.path.join(os.path.split(__file__)[0], f)).read()
- for f in files]
final_code = ''
- for code in codes:
- final_code += code
+ for f in files:
+ with open(os.path.join(os.path.split(__file__)[0], f)) as fil:
+ final_code += fil.read()
return final_code % sub
def c_code_helper(self, bottom, weights, top, sub, height=None, width=None):