GenericOperation

class GenericOperation(val name: String, val parameters: Map<String, Any> = emptyMap(), val type: String = "generic") : BaseOperation(source)

A generic operation that can be used when a specialized operation class is not available.

Constructors

Link copied to clipboard
constructor(name: String, parameters: Map<String, Any> = emptyMap(), type: String = "generic")

Properties

Link copied to clipboard
open override val name: String

Unique name of this operation type

Link copied to clipboard
open override val parameters: Map<String, Any>

Parameters for this operation

Link copied to clipboard
open override val type: String

Type/category of this operation (e.g., "math", "nn", "shape")

Functions

Link copied to clipboard
open override fun clone(newParameters: Map<String, Any>): Operation

Clone this operation with potentially different parameters

Link copied to clipboard
open override fun <T : DType, V> execute(inputs: List<Tensor<T, V>>): List<Tensor<T, V>>

Execute this operation with the given inputs

Link copied to clipboard
open override fun inferOutputs(inputs: List<TensorSpec>): List<TensorSpec>

Infer the output tensor specifications from input specifications

Link copied to clipboard
open override fun validateInputs(inputs: List<TensorSpec>): ValidationResult

Validate that the given inputs are compatible with this operation