""" Print 3 summary that show where the time is spend. The first show an Apply-wise summary, the second show an Op-wise summary, the third show an type-Op-wise summary.
""" Print 3 summary that show where the time is spend. The first show an Apply-wise summary, the second show an Op-wise summary, the third show an type-Op-wise summary.
The Apply-wise summary print the timing information for the worst offending Apply nodes. This corresponds to individual Op applications within your graph which take the longest to execute (so if you use dot twice, you will see two entries there).
The Apply-wise summary print the timing information for the worst offending Apply nodes. This corresponds to individual Op applications within your graph which take the longest to execute (so if you use dot twice, you will see two entries there).
...
@@ -87,8 +87,8 @@ class ProfileMode(Mode):
...
@@ -87,8 +87,8 @@ class ProfileMode(Mode):
:param n_ops_to_print: the number of ops to print. Default 20, or n_apply_to_print flag.
:param n_ops_to_print: the number of ops to print. Default 20, or n_apply_to_print flag.
"""Return the value for a key passed via the THEANO_FLAGS environment variable.
:type key: a string
classTheanoConfig(object):
:param key: the key to lookup
"""Return the value for a key after parsing ~/.theano.cfg and
:type default: any
the THEANO_FLAGS environment variable.
:param default: the value to be returned if the key is not present. (Default: None)
We parse in that order the value to have:
if the variable don't exist return `default`
1)the pair 'section.option':value in default_
if the key is not in the variable return `default`
2)The ~/.theano.cfg file
if the key is in the variable but without a value return True
3)The value value provided in the get*() fct.
if the key is in the variable with a value return the value
The last value found is the value returned.
The THEANO_FLAGS environement variable should be a list of comma-separated [section.]option[=value] entries. If the section part is omited, their should be only one section with that contain the gived option.
"""
if the key appears many times, we return the last value
def__init__(self):
d={}# no section
fork,vindefault_.items():
iflen(k.split('.'))==1:
d[k]=v
The THEANO_FLAGS environement variable should be a list of comma-separated key[=value] entries.