quantized_nn_classifier.proto 963 B

1234567891011121314151617181920212223242526272829303132
  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. package assist_ranker;
  7. // The weights and biases for a single quantized neural-network layer. All
  8. // weight and bias values are 8-bit and can be converted to floats using
  9. // value = x * (high - low) / 256 + low.
  10. message QuantizedNNLayer {
  11. // The weights for the layer.
  12. repeated bytes weights = 1;
  13. // The bias vectors for the layer.
  14. optional bytes biases = 2;
  15. // The low value used to dequantize the weights.
  16. optional float low = 3;
  17. // The high value used to dequantize the weights.
  18. optional float high = 4;
  19. }
  20. // Defines the model weights and biases for a single layer neural network.
  21. message QuantizedNNClassifierModel {
  22. optional QuantizedNNLayer hidden_layer = 1;
  23. optional QuantizedNNLayer logits_layer = 2;
  24. }