2017-05-16 3 views
1

장갑 방법을 기반으로 한 단어 임베딩 모델을 훈련 중입니다. algorith 같은 로거 보여주고 있지만 :장갑을 훈련하는 동안 파일 오버플로 _xxxx.bin이 무엇을 의미합니까

$ build/cooccur -memory 4.0 -vocab-file vocab.txt -verbose 2 -window-size 8 </home/ignacio/data/GUsDany/corpus/GUs_regulon_pubMed.txt> cooccurrence.bin 
COUNTING COOCCURRENCES 
window size: 8 
context: symmetric 
max product: 13752509 
overflow length: 38028356 
Reading vocab from file "vocab.txt"...loaded 145223095 words. 
Building lookup table...table contains 228170143 elements. 
Processing token: 5478600000 

를 장갑의 홈 디렉토리는 overflow_0534.bin caled 파일로 가득 차 있습니다. 누군가가 모든 것이 잘되는지 알 수 있습니까?

감사합니다.

답변

0

모든 것이 정상입니다.

글러브 cooccur 프로그램의 소스 코드를 Github에서 볼 수 있습니다. 파일의 57 행에서

:

long long overflow_length; // Number of cooccurrence records whose product exceeds max_product to store in memory before writing to disk 

모음에 동시 발생 기록에 너무 많은이있는 경우, 일부 임시 빈 디스크 파일에 기록되는 일부 데이터가있을 것이다.

while (1) { 
    if (ind >= overflow_length - window_size) { // If overflow buffer is (almost) full, sort it and write it to temporary file 
     qsort(cr, ind, sizeof(CREC), compare_crec); 
     write_chunk(cr,ind,foverflow); 
     fclose(foverflow); 
     fidcounter++; 
     sprintf(filename,"%s_%04d.bin",file_head,fidcounter); 
     foverflow = fopen(filename,"w"); 
     ind = 0; 
    } 

변수 overflow_length은 메모리 설정에 따라 다릅니다.

라인 463 :

if ((i = find_arg((char *)"-memory", argc, argv)) > 0) memory_limit = atof(argv[i + 1]); 

라인 467 :

rlimit = 0.85 * (real)memory_limit * 1073741824/(sizeof(CREC)); 

라인 (470) : 답장을

overflow_length = (long long) rlimit/6; // 0.85 + 1/6 ~= 1 
+0

감사합니다. 그래서 거대한 파일들이 300 차원 이상의 모델들을 훈련시키는 것을 방지하는 방법은? – Nacho

+0

@Nacho'overflow_xxx.bins' 파일은 캐시 파일이므로'cooccurrence.bin' 파일이 생성 될 때 파일을 지울 수 있습니다. 이러한 파일을 피하려면 더 많은 RAM이 작동해야합니다. –