jabacat / jml

JABACAT-created machine learning library from scratch.
5 stars 5 forks source link

Set input and output size for a model, and query if they've been adequately set. #43

Open adamhutchings opened 11 months ago

adamhutchings commented 11 months ago

This is to implement the functions get_input_size, get_output_size, set_input_size, set_output_size,and is_specified.

As per the API document:

get_input_size Scope: jml::Model:: Arguments: Expected constraints: Returns: unsigned Description: This function queries the input size for a model.

get_output_size Scope: jml::Model:: Arguments: Expected constraints: Returns: unsigned Description: This function queries the output size for a model.

set_input_size Scope: jml::Model:: Arguments: unsigned size Expected constraints: size > 0 Returns: void Description: This function sets the input size for a model. This function errors if the model already has attached layers or training data.

set_output_size Scope: jml::Model:: Arguments: unsigned size Expected constraints: size > 0 Returns: void Description: This function sets the output size for a model. This function errors if the model already has attached layers or training data.

is_specified Scope: jml::Model:: Arguments: Expected constraints: Returns: bool Description: This function queries whether a given model is fully specified, and ready to be given training data and layers. This should return true if input and output size have been specified, and false otherwise.