print"Here are tips to potentially make your code run faster (if you think of new ones, suggest them on the mailing list). Test them first as they are not guaranteed to always provide a speedup."
print"""Here are tips to potentially make your code run faster
(if you think of new ones, suggest them on the mailing list).
Test them first as they are not guaranteed to always provide a speedup."""
print" - With the default gcc libm, exp in float32 is slower then in float64! Try Theano flags floatX=float64 or install amdlibm and set the theano flags lib.amdlibm=True"
print" - With the default gcc libm, exp in float32 is slower then in float64! Try Theano flags floatX=float64 or install amdlibm and set the theano flags lib.amdlibm=True"
print" - You have a dot operation that was not optimized to dot22 that is faster. Make sure the inputs are float32 or 64 and are the same for both input. Currently they are:",[i.typeforiinnode.inputs]
print" - You have a dot operation that was not optimized to dot22 that is faster. Make sure the inputs are float32 or 64 and are the same for both input. Currently they are:",[i.typeforiinnode.inputs]
gived_tip=True
#tip 5
#tip 5
fora,tinapply_time.iteritems():
fora,tinapply_time.iteritems():
node=a[1]
node=a[1]
ifisinstance(node.op,RandomFunction):
ifisinstance(node.op,RandomFunction):
gived_tip=True
print" - Replace the default random number generator by 'from theano.sandbox.rng_mrg import MRG_RandomStreams as RandomStreams' as this is is faster. It is still experimental, but seam to work correctly."
print" - Replace the default random number generator by 'from theano.sandbox.rng_mrg import MRG_RandomStreams as RandomStreams' as this is is faster. It is still experimental, but seam to work correctly."
ifconfig.device.startswith("gpu"):
ifconfig.device.startswith("gpu"):
print" - MRG_RandomStreams is the only random number supported on the GPU."
print" - MRG_RandomStreams is the only random number supported on the GPU."