Model.fit() computes much slower in version 0.6.5
With the same code base (example attached below, with 130 inputs / 3 outputs / single 60 ReLU hidden layer) and data set (roughly 500k records), the Model.fit() took roughly two hours to complete in the version 0.6.5 (as comparison, the version 0.6.2 took four minutes)
List<Tensors> layers = new List<Tensors>();
layers.add(inputLayerConfig.ToTensors());
foreach (IDenseLayerConfig hiddenLayerConfig in hiddenLayerConfigs ?? Enumerable.Empty<IDenseLayerConfig>())
{
layers.add(hiddenLayerConfig.ToTensors(layers.Last()));
}
layers.add(outputLayerConfig.ToTensors(layers.Last()));
Functional model = KerasApi.keras.Model(
layers.First(),
layers.Last()
);
model.compile(
KerasApi.keras.optimizers.SGD(0.001f),
KerasApi.keras.losses.CategoricalCrossentropy(from_logits: true),
new[] { "accuracy" }
);
tempModel.fit(
np.array(data),
np.array(result),
epochs: 1,
validation_split: 0.25f,
verbose: 1
);
Worth noting, the slowness seems only appear in 0.6.5, as version 0.6.4 took roughly four minutes to finish (similar to 0.6.2).
@ginnyliou Can you test v0.70?
@Oceania2018 Can confirm that slowness (of each step during fit) also occurs in v0.7
@ginnyliou Do you mind upload the complete runnable test project to reproduce the issue?
@Oceania2018 Please find the test project at https://github.com/ginnyliou/TempRecordsAnalysis (This is a trimmed down version of the actual code&data, even so, we can observe the step speed difference by changing the Nuget package version in the wrapper.)
Hope this helps.