process_builders.py 文件源码

python
阅读 32 收藏 0 点赞 0 评论 0

项目:nengo_dl 作者: nengo 项目源码 文件源码
def __init__(self, ops, signals):
        super(SimProcessBuilder, self).__init__(ops, signals)

        logger.debug("process %s", [op.process for op in ops])
        logger.debug("input %s", [op.input for op in ops])
        logger.debug("output %s", [op.output for op in ops])
        logger.debug("t %s", [op.t for op in ops])

        # if we have a custom tensorflow implementation for this process type,
        # then we build that. otherwise we'll execute the process step
        # function externally (using `tf.py_func`), so we just need to set up
        # the inputs/outputs for that.

        if isinstance(ops[0].process, self.TF_PROCESS_IMPL):
            # note: we do this two-step check (even though it's redundant) to
            # make sure that TF_PROCESS_IMPL is kept up to date

            if type(ops[0].process) == Lowpass:
                self.built_process = LowpassBuilder(ops, signals)
            elif isinstance(ops[0].process, LinearFilter):
                self.built_process = LinearFilterBuilder(ops, signals)
        else:
            self.built_process = GenericProcessBuilder(ops, signals)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号