Search code examples
c#machine-learningml.netmicrosoft.ml

How to save/use Microsoft.ML's cached bottleneck computation values


When training a model using Microsoft.ML the bottleneck computation can take a LONG time.

Phase: Bottleneck Computation, Dataset used: Validation, Image Index:     1
Phase: Bottleneck Computation, Dataset used: Validation, Image Index:     2
Phase: Bottleneck Computation, Dataset used: Validation, Image Index:     3
...
Phase: Bottleneck Computation, Dataset used: Validation, Image Index: 30000

In ImageClassificationTrainer.Options() there are two options, called:

ReuseValidationSetBottleneckCachedValues = true,
ReuseTrainSetBottleneckCachedValues = true,

These should ensure that when training again after you trained before the cashed bottleneck values are used to speed up the process (which would have saved me days by now). Unfortunately this is not the case as the bottleneck computations get redone every time, and I can't find anything about this..

How to use Microsoft.ML's Bottleneck computation value cashing?


Solution

  • You can do that by specifing the WorkspacePath parameter.