提交 33be0600 authored 作者: Ian Goodfellow's avatar Ian Goodfellow

fixed strutil issue

上级 b07d5f7b
def renderString(string, dict):
try:
finalCode = string % dict
except Exception , E:
#print 'could not render C code due to exception with message "'+str(E)+'", trying to find out why...'
i = 0
while i <= len(string):
try:
finalCode = string[0:i] % dict
except Exception, F:
if str(F) == str(E):
raise Exception(string[0:i]+"<<<< caused exception "+str(F))
i+=1
assert False
return finalCode
......@@ -5,7 +5,7 @@ import numpy as N
from theano import printing
from theano.tensor.blas_headers import blas_header_text
from theano.tensor.blas import ldflags
from theano.misc import strutil
#Note: not a true convolution because we don't bother with flipping the kernel
......
import theano
from theano.tensor import basic as T
#from util import strutil
from theano.misc import strutil
import numpy as N
class ConvGrad3D(theano.Op):
......@@ -265,3 +265,6 @@ class ConvGrad3D(theano.Op):
convGrad3D = ConvGrad3D()
from Conv3D import conv3D
from ConvTransp3D import convTransp3D
import numpy as N
from theano.tensor import basic as T
#from util import strutil
from theano.misc import strutil
import theano
class ConvTransp3D(theano.Op):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论