Evaluate Neural Networks

To evaluate a neural network means to propagate input through the network and get the output of the network.

Evaluate a neural network.

nntoolkit.evaluate.get_model_output(model, x)[source]
Parameters:
  • model – A dictionary which represents a model
  • x – An input vector
Returns:

The output vector of the model

nntoolkit.evaluate.get_parser()[source]

Return the parser object for this script.

nntoolkit.evaluate.get_results(model_output, output_semantics)[source]
Parameters:
  • model_output – A list of probabilities
  • output_semantics – A list of semantics
Returns:

A list of dictionaries which have probability and semantics as keys.

nntoolkit.evaluate.main(modelfile, features, print_results=True)[source]

Evaluate the model described in modelfile with inputvec as input data.

Parameters:
  • features – List of floats
  • print_results – Print results if True. Always return results.
Returns:

List of possible answers, reverse-sorted by probability.

nntoolkit.evaluate.main_bash(modelfile, inputvec_file, print_results=True)[source]
Evaluate the model described in modelfile with inputvec_file as
input data.
Parameters:
  • inputvec_file – File with json content. The content is a list with one list as element. This list contains floats.
  • print_results – Print results if True. Always return results.
nntoolkit.evaluate.show_results(results, n=10, print_results=True)[source]

Show the top-n results of a classification.

Previous topic

Train Neural Networks

Next topic

Test Neural Networks

This Page