data_set.py 文件源码

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

项目:auDeep 作者: auDeep 项目源码 文件源码
def contains(self,
                 filename: str,
                 chunk_nr: int) -> bool:
        """
        Check whether this data set contains an instance with the specified filename and chunk number.

        Parameters
        ----------
        filename: str
            The filename of the instance
        chunk_nr: int
            The chunk number of the instance

        Returns
        -------
        bool
            True, if this data set contains an instance with the specified filename and chunk number, False otherwise
        """
        if filename not in self._data[_DataVar.FILENAME].values:
            return False

        instances_with_filename = self._data.where(self._data[_DataVar.FILENAME] == filename)

        return chunk_nr in instances_with_filename[_DataVar.CHUNK_NR].values
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号