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.

tensor_shape.proto 1.7 kB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. // Protocol buffer representing the shape of tensors.
  2. syntax = "proto3";
  3. option cc_enable_arenas = true;
  4. option java_outer_classname = "TensorShapeProtos";
  5. option java_multiple_files = true;
  6. option java_package = "org.tensorflow.framework";
  7. option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/framework/tensor_shape_go_proto";
  8. package tensorflow;
  9. // Dimensions of a tensor.
  10. message TensorShapeProto {
  11. // One dimension of the tensor.
  12. message Dim {
  13. // Size of the tensor in that dimension.
  14. // This value must be >= -1, but values of -1 are reserved for "unknown"
  15. // shapes (values of -1 mean "unknown" dimension). Certain wrappers
  16. // that work with TensorShapeProto may fail at runtime when deserializing
  17. // a TensorShapeProto containing a dim value of -1.
  18. int64 size = 1;
  19. // Optional name of the tensor dimension.
  20. string name = 2;
  21. };
  22. // Dimensions of the tensor, such as {"input", 30}, {"output", 40}
  23. // for a 30 x 40 2D tensor. If an entry has size -1, this
  24. // corresponds to a dimension of unknown size. The names are
  25. // optional.
  26. //
  27. // The order of entries in "dim" matters: It indicates the layout of the
  28. // values in the tensor in-memory representation.
  29. //
  30. // The first entry in "dim" is the outermost dimension used to layout the
  31. // values, the last entry is the innermost dimension. This matches the
  32. // in-memory layout of RowMajor Eigen tensors.
  33. //
  34. // If "dim.size()" > 0, "unknown_rank" must be false.
  35. repeated Dim dim = 2;
  36. // If true, the number of dimensions in the shape is unknown.
  37. //
  38. // If true, "dim.size()" must be 0.
  39. bool unknown_rank = 3;
  40. };