Add auto size support in meaning dataset.
This commit is contained in:
parent
24957aa2ae
commit
50e502ae96
|
@ -256,8 +256,8 @@ class MeaningDataset(Dataset):
|
|||
self,
|
||||
start,
|
||||
end,
|
||||
size,
|
||||
vocab_size,
|
||||
size=None,
|
||||
max_subitem=10,
|
||||
min_subitem=1,
|
||||
min_seq_len=2,
|
||||
|
@ -278,7 +278,10 @@ class MeaningDataset(Dataset):
|
|||
self.seq_meaning = []
|
||||
self.m_height = map.ms_height
|
||||
self.m_weight = map.ms_weight
|
||||
meanings = np.random.randint(start, end, size=(size))
|
||||
if size:
|
||||
meanings = np.random.randint(start, end, size=(size))
|
||||
else:
|
||||
meanings = np.arange(start, end)
|
||||
|
||||
seq_len = []
|
||||
for m in meanings:
|
||||
|
|
Loading…
Reference in New Issue