data

package
v1.1.13 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2020 License: BSD-3-Clause Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var KiT_DataLoopOrder = kit.Enums.AddEnum(DataLoopOrderN, kit.NotBitFlag, nil)
View Source
var USTimeInVals map[string]int = map[string]int{}/* 321 elements not displayed */

Functions

func IntSequence

func IntSequence(begin, end, step int) (sequence []int)

Types

type DataLoopOrder

type DataLoopOrder int
const (
	SEQUENTIAL DataLoopOrder = iota
	PERMUTED
	RANDOM
	DataLoopOrderN
)

type EpochParams

type EpochParams struct {
	TrialGpName         string    `desc:"name"`
	PercentOfTotal      float64   `desc:"Percent of all trials for this type"`
	ValenceContext      p.Valence `desc:"Positive or negative reward valence"`
	USProb              float64   `desc:"Probability of US"`
	FixedProb           bool      `desc:"Fixed probability?"`
	MixedUS             bool      `desc:"Mixed US set?"`
	USMagnitude         float64   `desc:"US magnitude"`
	AlphTicksPerTrialGp int       `desc:"Number of ticks for a trial"`
	CS                  string    `desc:"Conditioned stimulus"`
	CSTimeStart         p.Tick    `desc:"Tick of CS start"`
	CSTimeEnd           p.Tick    `desc:"Tick of CS end"`
	CS2TimeStart        p.Tick    `desc:"Tick of CS2 start"`
	CS2TimeEnd          p.Tick    `desc:"Tick of CS2 end"`
	USType              p.US      `desc:"Unconditioned stimulus"`
	USTimeStart         p.Tick    `desc:"Tick for start of US presentation"`
	USTimeEnd           p.Tick    `desc:"Tick for end of US presentation"`
	Context             string    `desc:"Context"`
	Location            string    `desc:"Location"`
}

Epoch : epoch-level state aka TrialGroup

type EpochParamsList

type EpochParamsList []*EpochParams

func (*EpochParamsList) Append

func (epl *EpochParamsList) Append(ins interface{}) IRecs

func (*EpochParamsList) Get

func (epl *EpochParamsList) Get(i int) interface{}

func (*EpochParamsList) Length

func (epl *EpochParamsList) Length() int

type EpochParamsMap

type EpochParamsMap map[string]EpochParamsList

func AllEpochParams

func AllEpochParams() EpochParamsMap

imported from PVLVEnv->EnvEpochParams_Group in cemer

type EpochParamsRecs

type EpochParamsRecs struct {
	Recs
}

func NewEpochParamsRecs

func NewEpochParamsRecs(epl *EpochParamsList) *EpochParamsRecs

func (*EpochParamsRecs) ReadNext

func (eps *EpochParamsRecs) ReadNext() *EpochParams

type IRecs

type IRecs interface {
	Length() int
	Append(interface{}) IRecs
	Get(int) interface{}
}

type Recs

type Recs struct {
	Records IRecs
	DType   reflect.Kind
	Index   []int
	INext   int
	NRead   int
	Order   DataLoopOrder
}

func NewRecs

func NewRecs(irecs IRecs) *Recs

func (*Recs) AtEnd

func (recs *Recs) AtEnd() bool

func (*Recs) Cur

func (recs *Recs) Cur() int

func (*Recs) GetIndex

func (recs *Recs) GetIndex() []int

func (*Recs) Length

func (recs *Recs) Length() int

func (*Recs) Permute

func (recs *Recs) Permute()

func (*Recs) ReadNext

func (recs *Recs) ReadNext() interface{}

func (*Recs) Reset

func (recs *Recs) Reset()

Set to initial state just before reading

func (*Recs) Sequential

func (recs *Recs) Sequential()

func (*Recs) SetIndex

func (recs *Recs) SetIndex(ix []int) error

Set the entire index array for the TrialInstanceRecs

func (*Recs) SetOrder

func (recs *Recs) SetOrder(order DataLoopOrder)

func (*Recs) SetPos

func (recs *Recs) SetPos(i int)

func (*Recs) WriteNext

func (recs *Recs) WriteNext(rec interface{})

type RunConfig

type RunConfig struct {
	ConfigId         string `desc:"Identifier for this type of configuration"`
	Desc             string `desc:"Description of this configuration"`
	Users            string `` /* 252-byte string literal not displayed */
	ConfigSeqList    string `` /* 130-byte string literal not displayed */
	EnvParamsTable   string `` /* 284-byte string literal not displayed */
	FixedProb        bool   `desc:"General purpose bool-like param to use when one wants to use exact probabilities; comes in handy for de-bugging, etc."`
	StartupProg      string `desc:"Grogram for handling startup args specific to this environment"`
	InitProg         string `desc:"Program to run to initialize at start of training"`
	RunProg          string `desc:"Program controlling each step of running"`
	EnvProg          string `desc:"Program to set up environment for this configuration"`
	TrainEpochs      int    `desc:"Number of total epochs to train for"`
	UseTrialGp       bool   `` /* 221-byte string literal not displayed */
	TrialGpsPerEpoch int    `` /* 426-byte string literal not displayed */
	PermuteTrialGps  bool   `desc:"Permute list of Trial-level trials after generation"`
	TrialsPerEpoch   int    `desc:"Number of trials per epoch"`
	SaveFinalWts     bool   `desc:"Save final weights after training"`
	SaveWtsInterval  int    `desc:"How frequently to save weights during training (in epochs)"`
	TestInterval     int    `desc:"How frequently to test performance without training -- only applicable to training cases"`
	LogTrials        bool   `desc:"Whether to log trial-level data or not"`
	LoadWeights      bool   `` /* 146-byte string literal not displayed */
	WeightsFile      string `desc:"Full relative path (from project) to a weights file to load at start of training"`
	LoadStEpc        int    `desc:"If loading weights, what epoch does it start at?"`
	LrsStepEpochs    int    `desc:"how many epochs per given step in the lrate schedule: each step drops the lrate roughly in half (log scale)"`
}

type RunConfigsMap

type RunConfigsMap map[string]RunConfig

func AllRunConfigs

func AllRunConfigs() RunConfigsMap

imported from PVLV->

type RunParams

type RunParams struct {
	Nm               string `desc:"identifier for this type of configuration"`
	Desc             string `desc:"description of this configuration"`
	EpochParamsTable string `desc:"trial group name"`
	FixedProb        bool   `desc:"fixed probability for each trial group"`
	RunProg          string `view:"-"`
	InitProg         string `view:"-"`
	StartupProg      string `view:"-"`
	TrainEpochs      int    `desc:"number of epochs to train network for"`
	UseTrialGp       bool   `desc:"use trial groups to determine length of epoch, and organize trials -- default true"`
	TrialGpsPerEpoch int    `` /* 170-byte string literal not displayed */
	PermuteTrialGps  bool   `desc:"permute list of EpochParams-level trials after generation"`
	TrialsPerEpoch   int    `desc:"number of trials per epoch -- only used if use_trial_gp is false!"`
	SaveFinalWts     bool   `desc:"save final weights after training"`
	SaveWtsInterval  int    `desc:"how frequently to save weights during training (in epochs)"`
	TestRun          bool   `desc:"is this a testing-only run, no training?"`
	TestInterval     int    `desc:"how frequently (epochs) to run a test during training"`
	LogTrials        bool   `desc:"should trial-level data be saved to log files?"`
	LoadWeights      bool   `desc:"load initial weights from a file (specified in weights_file)"`
	WeightsFile      string `` /* 126-byte string literal not displayed */
	LoadStEpc        int    `desc:"after loading weights, reset epoch counter to this value (-1 = leave at value from the loaded weights)"`
	LrsStepEpochs    int    `desc:"learning rate schedule epochs per step of decrease in learning rate"`
	LrsNSteps        int    `desc:"number of steps in the learning rate schedule"`
	LrsBumpStep      int    `` /* 138-byte string literal not displayed */
	NBatches         int    `desc:"number of batches to run"`
	BatchStart       int    `desc:"batch number to start on"`
	LoadExp          bool   `view:"-" desc:"???? WHAT IS THIS????"`
	PainExpt         bool   `view:"-" desc:"???? WHAT IS THIS????"`
}

type RunParamsMap

type RunParamsMap map[string]RunParams

func AllRunParams

func AllRunParams() RunParamsMap

type RunSeqParams

type RunSeqParams struct {
	Nm       string `desc:"Name of the sequence"`
	Desc     string `desc:"Description"`
	SeqStep1 string `desc:"name of run param 1"`
	SeqStep2 string `desc:"name of run param 2"`
	SeqStep3 string `desc:"name of run param 3"`
	SeqStep4 string `desc:"name of run param 4"`
	SeqStep5 string `desc:"name of run param 5"`
}

A sequence of runs (each step is a RunParams object)

type SeqParamsMap

type SeqParamsMap map[string]RunSeqParams

func AllSeqParams

func AllSeqParams() SeqParamsMap

type TrialInstance

type TrialInstance struct {
	TrialName            string
	ValenceContext       pvlv.Valence
	USFlag               bool
	TestFlag             bool
	MixedUS              bool
	USProb               float64
	USMagnitude          float64
	AlphaTicksPerTrialGp int
	CS                   string
	CSTimeStart          int
	CSTimeEnd            int
	CS2TimeStart         int
	CS2TimeEnd           int
	USTimeStart          int
	USTimeEnd            int
	Context              string
	USType               string
}

A set of trial groups, sourced from an TrialParams list, instantiated according to the PercentOfTotal field in the source list. this is what we get after calling SetEpochTrialList Still not fully instantiated, US is still a probability

type TrialInstanceList

type TrialInstanceList []*TrialInstance

func (*TrialInstanceList) Append

func (til *TrialInstanceList) Append(ins interface{}) IRecs

func (*TrialInstanceList) Get

func (til *TrialInstanceList) Get(i int) interface{}

func (*TrialInstanceList) Length

func (til *TrialInstanceList) Length() int

type TrialInstanceRecs

type TrialInstanceRecs struct {
	Recs
}

func NewTrialInstanceRecs

func NewTrialInstanceRecs(til *TrialInstanceList) *TrialInstanceRecs

func (*TrialInstanceRecs) ReadNext

func (til *TrialInstanceRecs) ReadNext() *TrialInstance

type USTVal

type USTVal struct {
	Enum   int
	Coords [4]int
}

Jump to

Keyboard shortcuts

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