haifengl / smile

Statistical Machine Intelligence & Learning Engine
https://haifengl.github.io
Other
6.03k stars 1.13k forks source link

HiddenLayerBuilder inaccessible in this context #612

Closed Gab601 closed 3 years ago

Gab601 commented 3 years ago

Describe the bug I tried creating a new array of Layers for an mlp classifier, but get the following error message:

Type HiddenLayerBuilder! is inaccessible in this context due to: public/*package*/ open class HiddenLayerBuilder : LayerBuilder defined in smile.base.mlp in file HiddenLayerBuilder.class

Expected behavior The code was copied directly from the Kotlin SMILE documentation, so I expected it to compile and create a Layer object.

Actual behavior

Type HiddenLayerBuilder! is inaccessible in this context due to: public/*package*/ open class HiddenLayerBuilder : LayerBuilder defined in smile.base.mlp in file HiddenLayerBuilder.class

Code snippet

import smile.base.mlp.* arrayOf(Layer.sigmoid(10), Layer.mle(1, OutputFunction.SIGMOID))

Input data

Additional context

haifengl commented 3 years ago

Layer class provides factory methods to create hidden layers, e.g. Layer.rectifier().