core

package
v0.0.0-...-ced6fe5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 14, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ResizeImage

func ResizeImage(img image.Image, width, height int) image.Image

ResizeTensor redimensiona el tensor a un tamaño fijo para normalizar la comparación

func SaveTensorToImage

func SaveTensorToImage(filename string, t *Tensor4D)

saveTensorToImage es una utilidad para visualizar lo que la red neuronal "ve"

Types

type Tensor4D

type Tensor4D struct {
	Data     []float64
	Batch    int
	Channels int
	Height   int
	Width    int
	// contains filtered or unexported fields
}

Tensor4D representa un volumen de datos [Batch, Channels, Height, Width]

func LoadAndNormalizeImage

func LoadAndNormalizeImage(path string, w, h int) (*Tensor4D, error)

func LoadImageToTensor

func LoadImageToTensor(path string) (*Tensor4D, error)

func NewTensor4D

func NewTensor4D(b, c, h, w int) *Tensor4D

NewTensor4D inicializa la estructura y calcula los saltos de memoria (strides)

func (*Tensor4D) At

func (t *Tensor4D) At(b, c, h, w int) float64

At devuelve el valor en la coordenada específica

func (*Tensor4D) Set

func (t *Tensor4D) Set(b, c, h, w int, val float64)

Set asigna un valor en la coordenada específica

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL