Upload modeling_fastesm.py with huggingface_hub
Browse files- modeling_fastesm.py +1 -2
modeling_fastesm.py
CHANGED
|
@@ -756,8 +756,7 @@ class EmbeddingMixin:
|
|
| 756 |
for seq, emb, mask in zip(seqs, embeddings, attention_mask):
|
| 757 |
if full_embeddings:
|
| 758 |
emb = emb[mask.bool()].reshape(-1, hidden_size)
|
| 759 |
-
c.execute("INSERT OR REPLACE INTO embeddings VALUES (?, ?)",
|
| 760 |
-
(seq, emb.cpu().numpy().tobytes()))
|
| 761 |
|
| 762 |
if (i + 1) % 100 == 0:
|
| 763 |
conn.commit()
|
|
|
|
| 756 |
for seq, emb, mask in zip(seqs, embeddings, attention_mask):
|
| 757 |
if full_embeddings:
|
| 758 |
emb = emb[mask.bool()].reshape(-1, hidden_size)
|
| 759 |
+
c.execute("INSERT OR REPLACE INTO embeddings VALUES (?, ?)", (seq, emb.cpu().numpy().tobytes()))
|
|
|
|
| 760 |
|
| 761 |
if (i + 1) % 100 == 0:
|
| 762 |
conn.commit()
|