---
title: "linear(weight:)"
framework: accelerate
role: symbol
role_heading: Instance Method
path: "accelerate/bnnsgraph/builder/tensor/linear(weight:)"
---

# linear(weight:)

Adds a linear transformation operation to the current graph.

## Declaration

```swift
func linear(weight: some BNNSGraph.Builder.OperationParameter<T>) -> BNNSGraph.Builder.Tensor<T>
```

## Parameters

- `weight`: The weight.

## Discussion

Discussion This function treats self as x and weight as A in y = xA^T.
