forked from SciSharp/TensorFlow.NET
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathModel.Save.cs
More file actions
26 lines (24 loc) · 749 Bytes
/
Model.Save.cs
File metadata and controls
26 lines (24 loc) · 749 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
using System.Collections.Generic;
using Tensorflow.Keras.Metrics;
using Tensorflow.ModelSaving;
namespace Tensorflow.Keras.Engine
{
public partial class Model
{
ModelSaver saver = new ModelSaver();
/// <summary>
/// Saves the model to Tensorflow SavedModel or a single HDF5 file.
/// </summary>
/// <param name="filepath"></param>
/// <param name="overwrite"></param>
/// <param name="include_optimizer"></param>
public void save(string filepath,
bool overwrite = true,
bool include_optimizer = true,
string save_format = "tf",
SaveOptions options = null)
{
saver.save(this, filepath);
}
}
}