data.proto 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. // DRAGNN data proto. See go/dragnn-design for more information.
  2. syntax = "proto2";
  3. package syntaxnet.dragnn;
  4. // A fixed sparse bag of features in DRAGNN. The id, weight, and description
  5. // fields are all aligned if present (ie, any of these that are non-empty should
  6. // have the same # items). If weight is omitted, 1.0 is used.
  7. //
  8. // These features as interepreted as multiple firings of a single feature
  9. // template: e.g., for a single focus word, a bag of ngrams.
  10. message FixedFeatures {
  11. repeated uint64 id = 1;
  12. repeated float weight = 2;
  13. // string-valued description of each *feature value*. (Only used for
  14. // debugging.)
  15. repeated string value_name = 3;
  16. // string-valued name of feature. (Only used for debugging.)
  17. optional string feature_name = 4;
  18. }
  19. // A feature in DRAGNN thats link a component to another or a component to
  20. // itself recurrently. If batch_idx or beam_idx are omitted, 0 is used.
  21. message LinkFeatures {
  22. // Index into the {step x batch x beam} activations workspace generated by
  23. // the previous computation.
  24. optional int64 batch_idx = 1;
  25. optional int64 beam_idx = 2;
  26. optional int64 step_idx = 3;
  27. // Values in the original feature space. This is ignored in TensorFlow.
  28. optional int64 feature_value = 4;
  29. // string-valued name of feature. (Only used for debugging.)
  30. optional string feature_name = 5;
  31. }