Documentation
¶
Overview ¶
Package classifier is a MNIST-based digit classifier. It loads a pre-trained model and offers a Classify method that will classify any image, by first resizing it to the model's input size.
To use it, create a Classifier with New(), and then simply call its Classify method with a 32x32 image.
This is an example of how to serve a model for inference.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Classifier ¶
type Classifier struct {
// contains filtered or unexported fields
}
Classifier holds the MNIST model compiled. It will use XLA with GPU if available or CPU by default. But the backend can be configured with GOMLX_BACKEND.
func New ¶
func New(checkpointDir string) (*Classifier, error)
New creates a new Classifier object that can be used to classify images using a MNIST model.
Click to show internal directories.
Click to hide internal directories.