Open gourango01 opened 8 years ago
Got a solution, but I did not check it for correctness. It involves making the mask for the sliding windows fit your dimensions.
Here is what i did
# move the sliding window
for i in range(batch_size):
mask = [0] * span
# taking context words equal to num_skips
for ns in range(0,num_skips):
posNumber = random.randint(0,span-1)
while (posNumber == skip_window or or mask[posNumber]== 1):
posNumber = random.randint(0,span-1)
mask[posNumber]=1
ValueError: cannot copy sequence with size 4 to array axis with dimension 2.