76bedc874bc399c4171086d7fce4121e3fc8f860,deeppavlov/data/dataset.py,Dataset,batch_generator,#Dataset#Any#Any#,16
Before Change
Returns:
batch_gen: a generator, that iterates through the part (defined by data_type) of dataset
raise NotImplementedError("Batch generator must be implemented for Dataset class!")
def iter_all(self):
rIterate through all data. It can be used for building dictionary or
After Change
batch_gen: a generator, that iterates through the part (defined by data_type) of dataset
data = self.data[data_type]
data_len = len(data)
order = list(range(data_len))
random.shuffle(order)
for i in range((data_len - 1) // batch_size + 1):
yield list(zip(*[data[o] for o in order[i*batch_size:(i+1)*batch_size]]))
def iter_all(self, data_type: str = "train") -> Generator:
rIterate through all data. It can be used for building dictionary or
Returns:
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 8
Instances
Project Name: deepmipt/DeepPavlov
Commit Name: 76bedc874bc399c4171086d7fce4121e3fc8f860
Time: 2017-12-07
Author: yoptar@gmail.com
File Name: deeppavlov/data/dataset.py
Class Name: Dataset
Method Name: batch_generator
Project Name: RaRe-Technologies/gensim
Commit Name: 51a01331d5a71c638d421f0ac45de19cda251a81
Time: 2010-02-03
Author: radimrehurek@seznam.cz
File Name: docsim.py
Class Name: SimilarityABC
Method Name: __iter__
Project Name: RaRe-Technologies/gensim
Commit Name: 474a7aa3c5300446a2d471d24c6c66dee8fc46c7
Time: 2010-02-03
Author: piskvorky@92d0401f-a546-4972-9173-107b360ed7e5
File Name: docsim.py
Class Name: SimilarityABC
Method Name: __iter__