Esempio n. 1
0
        public Status Import(byte[] bytes)
        {
            var graph_def = new Tensorflow.Buffer(bytes);
            var opts      = c_api.TF_NewImportGraphDefOptions();

            c_api.TF_GraphImportGraphDef(_handle, graph_def, opts, Status);
            return(Status);
        }
Esempio n. 2
0
        public Status Import(string file_path)
        {
            var bytes     = File.ReadAllBytes(file_path);
            var graph_def = new Tensorflow.Buffer(bytes);
            var opts      = c_api.TF_NewImportGraphDefOptions();

            c_api.TF_GraphImportGraphDef(_handle, graph_def, opts, Status);
            return(Status);
        }
Esempio n. 3
0
        public Status Import(byte[] bytes, string prefix = "")
        {
            var graph_def = new Tensorflow.Buffer(bytes);
            var opts      = c_api.TF_NewImportGraphDefOptions();

            c_api.TF_ImportGraphDefOptionsSetPrefix(opts, prefix);
            var status = new Status();

            c_api.TF_GraphImportGraphDef(_handle, graph_def, opts, status);
            c_api.TF_DeleteImportGraphDefOptions(opts);
            return(status);
        }