tensor2image

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 20, 2020 License: BSD-3-Clause Imports: 13 Imported by: 0

README

tensor2image

Overview

Description

Converts a mathematical tensor into an image (an array of any number of dimentions with value of integers ranging from 0 to 255) format to an image type (i.e. jpg, png, gif).

Implementation details

Converts rank 3 or 4 tensor of integers to image.image type. With extension image.image used. The standard "image, image/jpg, image/png, image/gif" golang library is used.

Compliance to Spec

Rough level of compliance

100%

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

Types

type Config

type Config struct {
	Operation string                 `json:"operation"`
	Params    map[string]interface{} `json:"params,omitempty"`
	Input     map[string]interface{} `json:"input,omitempty"`
}

type Input

type Input struct {
	Tensor interface{} `md:"tensor"`
}

func (*Input) FromMap

func (i *Input) FromMap(values map[string]interface{}) error

type Operation

type Operation struct {
	// contains filtered or unexported fields
}

func (*Operation) Eval

func (a *Operation) Eval(inputs map[string]interface{}) (interface{}, error)

type Params

type Params struct {
	Extension    string `md:"extension", required=true`
	ToFileFolder string `md:"toFileFolder"`
	Filename     string `md:"filename"`
}

Jump to

Keyboard shortcuts

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