

def on_import(self, fgraph, app, reason):
    '\n        Add Apply instance to set which must be computed.\n\n        '
    if (app in self.debug_all_apps):
        raise ProtocolError('double import')
    self.debug_all_apps.add(app)
    if getattr(app.op, 'destroy_map', {
        
    }):
        self.destroyers.add(app)
    for (o_idx, i_idx_list) in iteritems(getattr(app.op, 'view_map', {
        
    })):
        if (len(i_idx_list) > 1):
            raise NotImplementedError('destroying this output invalidates multiple inputs', app.op)
        o = app.outputs[o_idx]
        i = app.inputs[i_idx_list[0]]
        self.view_i[o] = i
        self.view_o.setdefault(i, OrderedSet()).add(o)
    for (i, input) in enumerate(app.inputs):
        self.clients.setdefault(input, OrderedDict()).setdefault(app, 0)
        self.clients[input][app] += 1
    for (i, output) in enumerate(app.outputs):
        self.clients.setdefault(output, OrderedDict())
    self.stale_droot = True

dataset/ETHPy150Open rizar/attention-lvcsr/libs/Theano/theano/gof/destroyhandler.py DestroyHandler.on_import/original