Skip to content
Snippets Groups Projects
Commit 6ac26eb3 authored by Vojtech Moravec's avatar Vojtech Moravec
Browse files

Respect third dimension in getCacheFilePathForVQ

parent facaffb9
No related branches found
No related tags found
No related merge requests found
......@@ -36,7 +36,7 @@ public class QuantizationCacheManager {
private File getCacheFilePathForSQ(final String trainFile, final int codebookSize) {
final File inputFile = new File(trainFile);
return new File(cacheFolder, String.format("%s_%d_bits.qvc",
inputFile.getName(), codebookSize));
inputFile.getName(), codebookSize));
}
/**
......@@ -51,8 +51,8 @@ public class QuantizationCacheManager {
final int codebookSize,
final V3i vDim) {
final File inputFile = new File(trainFile);
return new File(cacheFolder, String.format("%s_%d_%dx%d.qvc", inputFile.getName(), codebookSize,
vDim.getX(), vDim.getY()));
return new File(cacheFolder, String.format("%s_%d_%dx%dx%d.qvc", inputFile.getName(), codebookSize,
vDim.getX(), vDim.getY(), vDim.getZ()));
}
......@@ -140,8 +140,8 @@ public class QuantizationCacheManager {
*/
public void saveCodebook(final String trainFile, final VQCodebook codebook) throws IOException {
final String fileName = getCacheFilePathForVQ(trainFile,
codebook.getCodebookSize(),
codebook.getVectorDims()).getAbsolutePath();
codebook.getCodebookSize(),
codebook.getVectorDims()).getAbsolutePath();
final CacheFileHeader header = createHeaderForVQ(new File(trainFile).getName(), codebook);
final VQCacheFile cacheFile = new VQCacheFile(header, codebook);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment