Skip to content

Commit

Permalink
fix: Fix bug in word masking
Browse files Browse the repository at this point in the history
  • Loading branch information
shahrukhqasim committed Dec 5, 2017
1 parent e6a6327 commit 279ce12
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion python/table_parse_2d/prepare_unlv.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,14 +293,16 @@ def see_table(self, table, increment):
neighbors_same_cell[i, 3]])

if neighbors_same_cell[i, 0] == 1 or neighbors_same_cell[i, 1] == 1:
output_tensor_word_mask[ny, nx] = 1
rgb[ny,nx] = np.array([0,0,255])
else:
rgb[ny,nx] = np.array([255,255,255])
# Set mask to 1
# output_tensor_word_mask[ny, nx] =1
# print (output_tensor_word_mask[ny, nx])

output_tensor_word_mask[ny, nx] = 1


if glove_not_found / N > 0.3:
print("WARNING: GloVe not found ratio", glove_not_found / N)

Expand Down

0 comments on commit 279ce12

Please sign in to comment.