Skip to content

Instantly share code, notes, and snippets.

View danielrenshaw's full-sized avatar

Daniel Renshaw danielrenshaw

View GitHub Profile
@danielrenshaw
danielrenshaw / gist:4b8b2d723a2d7319192f
Created May 29, 2015 07:12
Custom Theano Debug operation (for doing NaN/inf checking more selectively than MonitorMode)
import re
import numpy
import theano
import theano.gof
class Debug(theano.gof.Op):
view_map = {0: [0]}
@danielrenshaw
danielrenshaw / gist:8fd71250f9cba5a530c2
Created May 29, 2015 07:09
Theano diff (from a4e182d) for altering theano/compile/debugmode.py to enable NaN and inf checks during debugprinting
16c17,18
---
> import re
>
517c519,521
< scan_ops=None, profile=None):
---
> scan_ops=None, profile=None, include_nan_info=False,
> include_inf_info=False, recursion_rules='ALWAYS',
> print_test_value=False):
@danielrenshaw
danielrenshaw / gist:5d68c37c2bfd194bc830
Created May 29, 2015 07:08
Theano diff (from a4e182d) for altering theano/printing.py to enable NaN and inf checks during debugprinting
39c39,41
< done=None):
---
> done=None, include_nan_info=False,
> include_inf_info=False, recursion_rules='ALWAYS',
> print_test_value=False):
151c153,156
< profile=p)
---
> profile=p, include_nan_info=include_nan_info,