You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

ModelsApi.cs 664 B

12345678910111213141516171819202122
  1. using System;
  2. using System.Collections.Generic;
  3. using System.IO;
  4. using System.Text;
  5. using Tensorflow.Keras.Engine;
  6. using Tensorflow.Keras.Saving;
  7. using Tensorflow.Keras.Saving.SavedModel;
  8. using ThirdParty.Tensorflow.Python.Keras.Protobuf;
  9. namespace Tensorflow.Keras.Models
  10. {
  11. public class ModelsApi: IModelsApi
  12. {
  13. public Functional from_config(ModelConfig config)
  14. => Functional.from_config(config);
  15. public IModel load_model(string filepath, bool compile = true, LoadOptions? options = null)
  16. {
  17. return KerasLoadModelUtils.load_model(filepath, compile: compile, options: options) as Model;
  18. }
  19. }
  20. }