iterators.py 文件源码

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

项目:ml-pyxis 作者: vicolab 项目源码 文件源码
def __init__(self, db, keys, rng=np.random):
        super(DataIterator, self).__init__()
        self.db = db
        self.keys = keys
        self.rng = rng

        # If there is only one key, wrap it in a list
        if isinstance(self.keys, str):
            self.keys = [self.keys]

        # Retrieve the data specification (shape & dtype) for all data objects
        # Assumes that all samples have the same shape and data type
        self.spec = db.get_data_specification(0)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号