chromium/components/assist_ranker/proto/nn_classifier.proto

// Copyright 2018 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

syntax = "proto2";

option optimize_for = LITE_RUNTIME;

import "example_preprocessor.proto";

package assist_ranker;

// A vector of floating-point values.
message FloatVector {
  repeated float values = 1;
}

// The weights and biases for a single neural-network layer.
message NNLayer {
  // The weights for the layer.
  repeated FloatVector weights = 1;

  // The bias vectors for the layer.
  optional FloatVector biases = 2;
}

// Defines the model weights and biases for a neural network with a single
// hidden layer.
message NNClassifierModel {
  // The single hidden layer.
  optional NNLayer hidden_layer = 1;

  // The output logits layer.
  optional NNLayer logits_layer = 2;

  // The preprocessing config for this model. This is used to vectorize the
  // examples so they can be used as input for the classifier.
  optional ExamplePreprocessorConfig preprocessor_config = 3;
}