Class ModelWriter
Provides methods for saving models.
Inherited Members
Namespace: Unity.InferenceEngine
Assembly: Unity.InferenceEngine.dll
Syntax
[MovedFrom("Unity.Sentis")]
public static class ModelWriter
  Methods
Save(Stream, Model)
Serializes and saves the model description and weights to a stream.
Declaration
public static void Save(Stream stream, Model model)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Stream | stream | The stream to save the model to.  | 
      
| Model | model | The model to save.  | 
      
Save(Stream, ModelAsset)
Serializes and saves the model asset bytes to a stream.
Declaration
public static void Save(Stream stream, ModelAsset modelAsset)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Stream | stream | The stream to save the model to.  | 
      
| ModelAsset | modelAsset | The model asset to save.  | 
      
Save(string, Model)
Serializes and saves the model description and weights to a file.
Declaration
public static void Save(string fileName, Model model)
  Parameters
| Type | Name | Description | 
|---|---|---|
| string | fileName | The path to save the model file to.  | 
      
| Model | model | The model to save to file.  | 
      
Save(string, ModelAsset)
Serializes and saves the model description and weights to a file.
Declaration
public static void Save(string fileName, ModelAsset modelAsset)
  Parameters
| Type | Name | Description | 
|---|---|---|
| string | fileName | The path to save the model file to  | 
      
| ModelAsset | modelAsset | The model asset to save to file  |