nn_classifier.proto 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. // Copyright (c) 2018 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. syntax = "proto2";
  5. option optimize_for = LITE_RUNTIME;
  6. import "example_preprocessor.proto";
  7. package assist_ranker;
  8. // A vector of floating-point values.
  9. message FloatVector {
  10. repeated float values = 1;
  11. }
  12. // The weights and biases for a single neural-network layer.
  13. message NNLayer {
  14. // The weights for the layer.
  15. repeated FloatVector weights = 1;
  16. // The bias vectors for the layer.
  17. optional FloatVector biases = 2;
  18. }
  19. // Defines the model weights and biases for a neural network with a single
  20. // hidden layer.
  21. message NNClassifierModel {
  22. // The single hidden layer.
  23. optional NNLayer hidden_layer = 1;
  24. // The output logits layer.
  25. optional NNLayer logits_layer = 2;
  26. // The preprocessing config for this model. This is used to vectorize the
  27. // examples so they can be used as input for the classifier.
  28. optional ExamplePreprocessorConfig preprocessor_config = 3;
  29. }