소스 검색

Increase the number of epochs on the extremely small scale

Vadim Markovtsev 7 년 전
부모
커밋
3d3060c101
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  1. 4 1
      labours.py

+ 4 - 1
labours.py

@@ -710,7 +710,10 @@ def train_embeddings(index, matrix, tmpdir, shard_size=IDEAL_SHARD_SIZE):
         print("Training Swivel model...")
         swivel.FLAGS.submatrix_rows = shard_size
         swivel.FLAGS.submatrix_cols = shard_size
-        if len(meta_index) <= IDEAL_SHARD_SIZE:
+        if len(meta_index) <= IDEAL_SHARD_SIZE / 16:
+            embedding_size = 50
+            num_epochs = 20000
+        elif len(meta_index) <= IDEAL_SHARD_SIZE:
             embedding_size = 50
             num_epochs = 10000
         elif len(meta_index) <= IDEAL_SHARD_SIZE * 2: