aibase

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2023 License: AGPL-3.0 Imports: 3 Imported by: 0

README

RULEX 基础AI框架

科学计算

  • 概率模型
  • 均方差
  • 最小二乘法

基础AI算法

  • ANN
  • RNN

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAIRuntime

func NewAIRuntime(re typex.RuleX) typex.XAiRuntime

func NewBodyPoseRecognition

func NewBodyPoseRecognition(re typex.RuleX) typex.XAi

Types

type AIRuntime

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

func (*AIRuntime) GetAi

func (airt *AIRuntime) GetAi(uuid string) *typex.AI

func (*AIRuntime) GetRuleX

func (airt *AIRuntime) GetRuleX() typex.RuleX

func (*AIRuntime) ListAi

func (airt *AIRuntime) ListAi() []*typex.AI

func (*AIRuntime) LoadAi

func (airt *AIRuntime) LoadAi(Ai *typex.AI) error

func (*AIRuntime) RemoveAi

func (airt *AIRuntime) RemoveAi(uuid string) error

func (*AIRuntime) StartAi

func (airt *AIRuntime) StartAi(uuid string) error

func (*AIRuntime) Stop

func (airt *AIRuntime) Stop()

func (*AIRuntime) StopAi

func (airt *AIRuntime) StopAi(uuid string) error

func (*AIRuntime) UpdateAi

func (airt *AIRuntime) UpdateAi(Ai *typex.AI) error

type Algorithm

type Algorithm struct {
	UUID        string // UUID
	Type        string // 模型类型: ANN_APP1 RNN_APP2 CNN_APP3 ....
	Name        string // 名称
	State       int    // 0开启;1关闭
	Document    string // 文档连接
	Description string // 概述
}

* * 算法模型 *

type AlgorithmResource

type AlgorithmResource interface {
	Init(map[string]interface{}) error // 初始化环境
	// Type , Sample, ExpectOut
	Train(string, [][]float64, [][]float64) error      // 训练模型
	Load() error                                       // 加载模型
	OnCall(string, [][]float64) map[string]interface{} // 用数据去执行
	Unload() error                                     // 卸载模型
	AiDetail() Algorithm                               // 获取信息
}

* * AI 接口 *

type BodyPoseRecognition

type BodyPoseRecognition struct {
}

func (*BodyPoseRecognition) Infer

func (ba *BodyPoseRecognition) Infer(input [][]float64) [][]float64

func (*BodyPoseRecognition) Start

func (ba *BodyPoseRecognition) Start(map[string]interface{}) error

func (*BodyPoseRecognition) Stop

func (ba *BodyPoseRecognition) Stop()

Jump to

Keyboard shortcuts

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