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.

IDataAdapter.cs 903 B

4 years ago
123456789101112131415161718192021222324
  1. namespace Tensorflow.Keras.Engine.DataAdapters
  2. {
  3. /// <summary>
  4. /// In TF 2.0, tf.data is the preferred API for user to feed in data. In order
  5. /// to simplify the training code path, all the input data object will be
  6. /// converted to `tf.data.Dataset` if possible.
  7. /// </summary>
  8. public interface IDataAdapter
  9. {
  10. /// <summary>
  11. /// Whether the current DataAdapter could handle the input x and y.
  12. /// </summary>
  13. /// <param name="x">input features</param>
  14. /// <param name="y">target labels</param>
  15. /// <returns></returns>
  16. bool CanHandle(Tensors x, Tensors y = null);
  17. IDatasetV2 GetDataset();
  18. int GetSize();
  19. (Tensors, Tensors) Expand1d(Tensors x, Tensors y);
  20. (Tensors, Tensors, Tensors) Expand1d(Tensors x, Tensors y, Tensors sample_weight);
  21. bool ShouldRecreateIterator();
  22. }
  23. }