API
Auto
ChainPlots.FIXED_INPUT_DIM_LAYERS — ConstantFIXED_INPUT_DIM_LAYERSList of layers with fixed-size input data
ChainPlots.NEURON_COLORS — ConstantNEURON_COLORS::Dict{Symbol, Symbol}Specify the color for each type of layer.
ChainPlots.UnitVector — TypeUnitVector{T}Structure for unit vectors in a linear space
Used for generating a basis to infer the layer connection
ChainPlots.chaingraph — Functionchaingraph(m::Flux.Chain)Return a MetaGraph representing the graph structure of the neural network.
In this case, the first layer must be a layer with fixed input dimension.
See chaingraph for the properties of each node of the graph.
ChainPlots.chaingraph — Methodchaingraph(m::Flux.Chain, input_data::Array)Return a MetaGraph representing the graph structure of the neural network.
Each node represents a neuron of the Chain m and contains the following properties: :layer_number: Int indicating to each layer it belongs ( with 0 indicating the input layer, 1, …, length(m)-1 indicating the hidden layers, and with length(m) indicating the output layer); :layer_type: symbol indicating the layer type it is part of in the Chain (e.g. :Dense, :GRUCell, :Conv, …); :index_in_layer: Tuple indicating the position of the neuron within the layer. The indices cover the size of the layer, which is given by a Tuple, e.g. of the form (n,) for Dense(n,m) and RNN(n,m), or (n₁, …, nₖ,m,d,b) for convolutional layers, and so on; :layer_center: Float64 with the vertical mid-point of the layer it belongs to.
ChainPlots.chaingraph — Methodchaingraph(m::Flux.Chain, ldim::Tuple)Return a MetaGraph representing the graph structure of the neural network with an input of shape ldim.
See chaingraph for the properties of each node of the graph.
ChainPlots.chaingraph — Methodchaingraph(l::Union{Flux.Dense,Flux.Recur,Flux.RNNCell,Flux.LSTMCell,Flux.GRUCell})Return a MetaGraph representing the graph structure of a neural network composed of the single layer l.
ChainPlots.get_dimensions — Methodget_dimensions(m::Flux.Chain, inp::Union{Nothing, Array, Tuple} = nothing)Return the dimensions of the input and of the output data of each hidden layer.
If input_data is not given, the first layer is required to be a layer with fixed input dimensions, such as Flux.Dense or Flux.Recur, otherwise the given data or shape is used to infer the dimensions of each layer.
ChainPlots.layerdimensions — Methodlayerdimensions()Retrive dimensions of a given fixed-input-size layer.
ChainPlots.layerplotattributes — Methodlayerplotattributes()Retrive plot attributes for each specific type of layer.
ChainPlots.neuron_color — Methodneuron_color(s; neuron_colors = NEURON_COLORS)Grab the color for each specific type of neuron.
The color depends on the type of layer the neuron belongs to and the colorset given neuron_colors, which defaults to NEURON_COLORS.
ChainPlots.neuron_connections — Functionneuron_connections(m::Flux.Chain, input_data::Union{Nothing,Array,Tuple} = nothing) -> Vector{Dict{Tuple, Vector{Tuple}}}Return all the connections from every neuron in each layer to the corresponding neurons in the next layer.
ChainPlots.neuron_indices — Methodneuron_indices(ldim:Tuple) -> Vector{NTuple{N, Int}} where NReturn all possible indices for a given Tuple ldim.
ChainPlots.plotchain — Functionplot(m::Flux.Chain, input_data::Union{Nothing,Array,Tuple} = nothing; kargs...)Plot the topology of Flux.Chain neural network m.
If the first layer accepts an input with arbitrary dimensions, an input_data must be provided, we can be a Vector, an Array, or just a Tuple with the dimensions of the input.
ChainPlots.projection — Methodprojection(z, center, max_widths, dimensions)Transform the indexing of a neuron into its x and y coordinates for plotting.
ChainPlots.NeuralNumbers.NeuralNumber — TypeNeuralNumber <: RealNeuralNumber encodes the "state" of a neuron as an Int8.
The possible states are: * state = Int8(0) for a "cold", or "off", state, meaning it can be triggered by a signal but it has not yet been triggered. It works as a neutral element in any diadic operation. * state = Int8(1) for a "hot", or "on", state, meaning it has been triggered by a signal.
The aliases are * cold = NeuralNumber(Int8(0)) * hot = NeuralNumber(Int8(1))
ChainPlots.NeuralNumbers.fneutralize — Methodfneutralize(m)Convert the parameters of a model to NeuralNumber with value cold.