forked from SciSharp/TensorFlow.NET
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIProtoBuf.cs
More file actions
27 lines (25 loc) · 886 Bytes
/
IProtoBuf.cs
File metadata and controls
27 lines (25 loc) · 886 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
27
namespace Tensorflow
{
/// <summary>
/// In order for a object to be serialized to and from MetaGraphDef,
/// the class must implement to_proto() and from_proto() methods
/// </summary>
public interface IProtoBuf<TProtoDef, TDef>
{
string name { get; }
/// <summary>
/// Converts a `Variable` to a `VariableDef` protocol buffer.
/// </summary>
/// <param name="export_scope"></param>
/// <returns></returns>
TProtoDef to_proto(string export_scope);
/// <summary>
/// Returns a `Variable` object created from `variable_def`.
/// </summary>
/// <typeparam name="T"></typeparam>
/// <param name="proto"></param>
/// <param name="import_scope"></param>
/// <returns></returns>
TDef from_proto(TProtoDef proto, string import_scope);
}
}