Predicting California house prices with MindSpore
A simple linear regression model to predict house prices in California
Overview
A simple linear regression model to predict house prices in California.
This model was trained on the California Housing Dataset using MindSpore 2.8.0 and exported in MindIR format as california-housing-linear-simple.mindir.
Dependencies
- MindSpore 2.8.0
- scikit-learn 1.8.0
The dependencies are specified in the included requirements.txt.
pip install -r requirements.txt
Usage
Load the model weights and initialize the mindspore.nn.GraphCell.
import mindspore
import mindspore.nn as nn
graph = mindspore.load('california-housing-linear-simple.mindir')
model = nn.GraphCell(graph)
Model inputs
A mindspore.Tensor of shape (n, 8) where n is the number of input samples.
Each input feature has dtype=mindspore.dtype.float16.
Model outputs
A mindspore.Tensor of shape (n, 1) where n is the number of output predictions.
Each output prediction has dtype=mindspore.dtype.float16.
End-to-end example
See the included notebook 01-load-infer.ipynb for details.
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support