Vertex Creation

The functions added by NaiveNASflux are basically Flux-tailored convenience wrappers around those exported by NaiveNASlib.

NaiveNASflux.denseinputvertexFunction
denseinputvertex(name, size)

Return an input type vertex with the given name which promises 2D shaped input with size number of features suitable for e.g. Fluxs Dense layer.

Providing the input type is not strictly necessary for the package to work and in many cases a normal inputvertex will do.

One example of when it is useful is the concat function which needs to know the input type to automatically determine which dimension to concatenate.

source
NaiveNASflux.rnninputvertexFunction
rnninputvertex(name, size)

Return an input type vertex with the given name which promises 2D shaped input with size number of features suitable for Fluxs recurrent layers.

Providing the input type is not strictly necessary for the package to work and in many cases a normal inputvertex will do.

One example of when it is useful is the concat function which needs to know the input type to automatically determine which dimension to concatenate.

source
NaiveNASflux.conv1dinputvertexFunction
conv1dinputvertex(name, nchannel)

Return an input type vertex with the given name which promises convolution shaped input with nchannel channels suitable for Fluxs convolution layers.

Equivalent to convinputvertex(name, nchannel, 1).

Providing the input type is not strictly necessary for the package to work and in many cases a normal inputvertex will do.

One example of when it is useful is the concat function which needs to know the input type to automatically determine which dimension to concatenate.

source
NaiveNASflux.conv2dinputvertexFunction
conv2dinputvertex(name, nchannel)

Return an input type vertex with the given name which promises convolution shaped input with nchannel channels suitable for Fluxs convolution layers.

Equivalent to convinputvertex(name, nchannel, 2).

Providing the input type is not strictly necessary for the package to work and in many cases a normal inputvertex will do.

One example of when it is useful is the concat function which needs to know the input type to automatically determine which dimension to concatenate.

source
NaiveNASflux.conv3dinputvertexFunction
conv3dinputvertex(name, nchannel)

Return an input type vertex with the given name which promises convolution shaped input with nchannel channels suitable for Fluxs convolution layers.

Equivalent to convinputvertex(name, nchannel, 3).

Providing the input type is not strictly necessary for the package to work and in many cases a normal inputvertex will do.

One example of when it is useful is the concat function which needs to know the input type to automatically determine which dimension to concatenate.

source
NaiveNASflux.convinputvertexFunction
convinputvertex(name, nchannel, ndim)

Return an input type vertex with the given name which promises convolution shaped input with nchannel channels and ndim number of dimensions for feature maps (e.g. 2 for images) suitable for Fluxs convolution layers.

Providing the input type is not strictly necessary for the package to work and in many cases a normal inputvertex will do.

One example of when it is useful is the concat function which needs to know the input type to automatically determine which dimension to concatenate.

source
NaiveNASflux.fluxvertexFunction
fluxvertex(l, in::AbstractVertex; layerfun=LazyMutable, traitfun=validated())

Return a vertex which wraps the layer l and has input vertex in.

Keyword argument layerfun can be used to wrap the computation, e.g. in an ActivationContribution.

Keyword argument traitfun can be used to wrap the MutationTrait of the vertex in a DecoratingTrait

source
fluxvertex(name::AbstractString, l, in::AbstractVertex; layerfun=LazyMutable, traitfun=validated())

Return a vertex with name name which wraps the layer l and has input vertex in.

Name is only used when displaying or logging and does not have to be unique (although it probably is a good idea).

Keyword argument layerfun can be used to wrap the computation, e.g. in an ActivationContribution.

Keyword argument traitfun can be used to wrap the MutationTrait of the vertex in a DecoratingTrait

source
NaiveNASflux.concatFunction
concat(v::AbstractVertex, vs::AbstractVertex...; traitfun=identity, layerfun=identity)

Return a vertex which concatenates input along the activation (e.g. channel if convolution, first dimension if dense) dimension.

Inputs must have compatible activation shapes or an exception will be thrown.

Keyword argument layerfun can be used to wrap the computation, e.g. in an ActivationContribution.

Keyword argument traitfun can be used to wrap the MutationTrait of the vertex in a DecoratingTrait

See also NaiveNASlib.conc.

source
concat(name::AbstractString, v::AbstractVertex, vs::AbstractVertex...; traitfun=identity, layerfun=identity)

Return a vertex with name name which concatenates input along the activation (e.g. channel if convolution, first dimension if dense) dimension.

Name is only used when displaying or logging and does not have to be unique (although it probably is a good idea).

Inputs must have compatible activation shapes or an exception will be thrown.

Keyword argument layerfun can be used to wrap the computation, e.g. in an ActivationContribution.

Keyword argument traitfun can be used to wrap the MutationTrait of the vertex in a DecoratingTrait

See also NaiveNASlib.conc.

source