topology.py 文件源码

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

项目:keras 作者: GeekLiB 项目源码 文件源码
def create_input_layer(self, batch_input_shape,
                           input_dtype=None, name=None):
        if not name:
            prefix = self.__class__.__name__.lower() + '_input_'
            name = prefix + str(K.get_uid(prefix))
        if not input_dtype:
            input_dtype = K.floatx()

        self.batch_input_shape = batch_input_shape
        self.input_dtype = input_dtype

        # Instantiate the input layer.
        x = Input(batch_shape=batch_input_shape,
                  dtype=input_dtype, name=name)
        # This will build the current layer
        # and create the node connecting the current layer
        # to the input layer we just created.
        self(x)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号