message: Toco: Fix a minor problem in affine fusing.
diff: @@ -278,6 +278,10 @@ bool FuseBinaryIntoPrecedingAffine::Run(Model* model, std::size_t op_index) {
  const auto& bias_name = preceding_op->inputs[2];
  const auto& weights = model->GetArray(weights_name);
  const auto& bias = model->GetArray(bias_name);
  + const int count_ops_consuming_bias = CountOpsWithInput(*model, bias_name);
  + const int count_ops_consuming_weights =
  + CountOpsWithInput(*model, weights_name);
  +
  if (binary_op->type == OperatorType::kAdd ||
  binary_op->type == OperatorType::kSub) {
  if (!bias.buffer) {
  @@ -287,7 +291,6 @@ bool FuseBinaryIntoPrecedingAffine::Run(Model* model, std::size_t op_index) {
  LogName(*binary_op), LogName(*preceding_op));
  return false;
  }
  - int count_ops_consuming_bias = CountOpsWithInput(*model, bias_name);
  if (count_ops_consuming_bias > 1) {
  AddMessageF(
  "Not fusing %s because the bias of the preceding %s is consumed by "
  @@ -303,11 +306,10 @@ bool FuseBinaryIntoPrecedingAffine::Run(Model* model, std::size_t op_index) {
  LogName(*binary_op), LogName(*preceding_op));
  return false;
  }
  - int count_ops_consuming_weights = CountOpsWithInput(*model, weights_name);
  - if (count_ops_consuming_weights > 1) {
  + if (count_ops_consuming_weights > 1 || count_ops_consuming_bias > 1) {
  AddMessageF(
  - "Not fusing %s because the weights of the preceding %s is consumed "
  - "by another op",
  + "Not fusing %s because the weights or bias of the preceding %s is "
  + "consumed by another op",
  LogName(*binary_op), LogName(*preceding_op));
  return false;
  }
  