--- theano/tensor/nnet/corr3d.py.orig 2020-11-14 20:22:36.000000000 -0700
+++ theano/tensor/nnet/corr3d.py 2020-11-23 16:00:09.635879511 -0700
@@ -250,12 +250,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(
--- theano/tensor/nnet/corr.py.orig 2020-11-14 20:22:36.000000000 -0700
+++ theano/tensor/nnet/corr.py 2020-11-23 16:00:09.636879514 -0700
@@ -269,12 +269,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):