FilmPredictor: Fixed prediction error

This commit is contained in:
Starbeamrainbowlabs 2020-09-15 19:18:20 +01:00
부모 304aa66358
커밋 c9e7826416
로그인 계정: sbrl
GPG 키 ID: 1BE5172E637709C2
1개의 변경된 파일1개의 추가작업 그리고 2개의 파일을 삭제

파일 보기

@ -131,7 +131,7 @@ class FilmPredictor {
);
return image.reshape([1, ...image.shape ]);
})
let result_array = await this.model.predict(imagetensor).array();
let result_array = (await this.model.predict(imagetensor).array())[0];
return this.array2genres(result_array);
}
@ -140,7 +140,6 @@ class FilmPredictor {
for(let i = 0; i < arr.length; i++) {
if(arr[i] < 0.5)
continue;
result.push(genres[i]);
}
return result;