Table of Contents

Class ImageProjector<T>

Namespace
AiDotNet.Diffusion.Models
Assembly
AiDotNet.dll

Projects image features to text embedding space.

public class ImageProjector<T>

Type Parameters

T

The numeric type.

Inheritance
ImageProjector<T>
Inherited Members

Constructors

ImageProjector(int, int, int, int?)

Initializes a new ImageProjector.

public ImageProjector(int inputDim = 768, int outputDim = 768, int numTokens = 4, int? seed = null)

Parameters

inputDim int
outputDim int
numTokens int
seed int?

Properties

ParameterCount

Gets the number of parameters.

public int ParameterCount { get; }

Property Value

int

Methods

GetParameters()

Gets all parameters.

public Vector<T> GetParameters()

Returns

Vector<T>

Project(Tensor<T>)

Projects image features to IP embedding.

public Tensor<T> Project(Tensor<T> imageFeatures)

Parameters

imageFeatures Tensor<T>

Returns

Tensor<T>

SetParameters(Vector<T>)

Sets all parameters.

public void SetParameters(Vector<T> parameters)

Parameters

parameters Vector<T>