<s> import tensorflow as tf <EOL> class BaseSampler ( object ) : <EOL> def __init__ ( self , session = None ) : <EOL> self . _session = session or tf . get_default_session ( ) <EOL> def sample ( self , variables , cost , gradient = None ) : <EOL> raise NotImplementedError <EOL> @ property <EOL> def session ( self ) : <EOL> return self . _session <EOL> @ session . setter <EOL> def session ( self , session ) : <EOL> self . _session = session </s>
