e2k 0.2.1__tar.gz → 0.2.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: e2k
3
- Version: 0.2.1
3
+ Version: 0.2.2
4
4
  Summary: A tool for automatic English to Katakana conversion
5
5
  Author-email: Patchethium <asguftuikh@gmail.com>
6
6
  Requires-Python: >=3.10
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "e2k"
3
- version = "0.2.1"
3
+ version = "0.2.2"
4
4
  description = "A tool for automatic English to Katakana conversion"
5
5
  readme = "README.md"
6
6
  authors = [{ name = "Patchethium", email = "asguftuikh@gmail.com" }]
@@ -140,6 +140,11 @@ class MHA:
140
140
 
141
141
  class S2S:
142
142
  def __init__(self, weights: Dict[str, np.ndarray], max_len: int = 16):
143
+ # fp32 is usually faster than fp16 on CPU
144
+ new_weight = {}
145
+ for k, v in weights.items():
146
+ new_weight[k] = v.astype(np.float32)
147
+ weights = new_weight
143
148
  self.e_emb = Embedding(weights["e_emb.weight"])
144
149
  self.k_emb = Embedding(weights["k_emb.weight"])
145
150
  self.encoder = GRU(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: e2k
3
- Version: 0.2.1
3
+ Version: 0.2.2
4
4
  Summary: A tool for automatic English to Katakana conversion
5
5
  Author-email: Patchethium <asguftuikh@gmail.com>
6
6
  Requires-Python: >=3.10
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes