Skip to content

Fix math display errors in readme #179

Fix math display errors in readme

Fix math display errors in readme #179

Triggered via pull request August 23, 2023 17:22
Status Success
Total duration 5m 51s
Artifacts

CI.yml

on: pull_request
Documentation
4m 9s
Documentation
Matrix: test
Fit to window
Zoom out
Zoom in

Annotations

7 warnings
Documentation: ../../../.julia/packages/Documenter/bYYzK/src/Utilities/Utilities.jl#L34
failed to run `@example` block in src/customized_layer.md:53-63 ```@example afc using Flux function MLP_3layer(input_dim::Int, hdims::Int, output_dim::Int; activation=Flux.leakyrelu) return Chain( Flux.Dense(input_dim, hdims, activation), Flux.Dense(hdims, hdims, activation), Flux.Dense(hdims, output_dim), ) end ``` value = ArgumentError: Package Flux not found in current path. - Run `import Pkg; Pkg.add("Flux")` to install the Flux package.
Documentation: ../../../.julia/packages/Documenter/bYYzK/src/Utilities/Utilities.jl#L34
failed to run `@example` block in src/customized_layer.md:73-101 ```@example afc using Functors using Bijectors using Bijectors: partition, combine, PartitionMask struct AffineCoupling <: Bijectors.Bijector dim::Int mask::Bijectors.PartitionMask s::Flux.Chain t::Flux.Chain end # to apply functions to the parameters that are contained in AffineCoupling.s and AffineCoupling.t, # and to re-build the struct from the parameters, we use the functor interface of `Functors.jl` # see https://fluxml.ai/Flux.jl/stable/models/functors/#Functors.functor @functor AffineCoupling (s, t) function AffineCoupling( dim::Int, # dimension of input hdims::Int, # dimension of hidden units for s and t mask_idx::AbstractVector, # index of dimension that one wants to apply transformations on ) cdims = length(mask_idx) # dimension of parts used to construct coupling law s = MLP_3layer(cdims, hdims, cdims) t = MLP_3layer(cdims, hdims, cdims) mask = PartitionMask(dim, mask_idx) return AffineCoupling(dim, mask, s, t) end ``` value = ArgumentError: Package Functors not found in current path. - Run `import Pkg; Pkg.add("Functors")` to install the Functors package.
Documentation: ../../../.julia/packages/Documenter/bYYzK/src/Utilities/Utilities.jl#L34
failed to run `@example` block in src/customized_layer.md:108-124 ```@example afc function Bijectors.transform(af::AffineCoupling, x::AbstractVector) # partition vector using 'af.mask::PartitionMask` x₁, x₂, x₃ = partition(af.mask, x) y₁ = x₁ .* af.s(x₂) .+ af.t(x₂) return combine(af.mask, y₁, x₂, x₃) end function Bijectors.transform(iaf::Inverse{<:AffineCoupling}, y::AbstractVector) af = iaf.orig # partition vector using `af.mask::PartitionMask` y_1, y_2, y_3 = partition(af.mask, y) # inverse transformation x_1 = (y_1 .- af.t(y_2)) ./ af.s(y_2) return combine(af.mask, x_1, y_2, y_3) end ``` value = UndefVarError: `Bijectors` not defined
Documentation: ../../../.julia/packages/Documenter/bYYzK/src/Utilities/Utilities.jl#L34
failed to run `@example` block in src/customized_layer.md:129-148 ```@example afc function Bijectors.with_logabsdet_jacobian(af::AffineCoupling, x::AbstractVector) x_1, x_2, x_3 = Bijectors.partition(af.mask, x) y_1 = af.s(x_2) .* x_1 .+ af.t(x_2) logjac = sum(log ∘ abs, af.s(x_2)) return combine(af.mask, y_1, x_2, x_3), logjac end function Bijectors.with_logabsdet_jacobian( iaf::Inverse{<:AffineCoupling}, y::AbstractVector ) af = iaf.orig # partition vector using `af.mask::PartitionMask` y_1, y_2, y_3 = partition(af.mask, y) # inverse transformation x_1 = (y_1 .- af.t(y_2)) ./ af.s(y_2) logjac = -sum(log ∘ abs, af.s(y_2)) return combine(af.mask, x_1, y_2, y_3), logjac end ``` value = UndefVarError: `Bijectors` not defined
Documentation: ../../../.julia/packages/Documenter/bYYzK/src/Utilities/Utilities.jl#L34
failed to run `@example` block in src/customized_layer.md:154-167 ```@example afc using Random, Distributions, LinearAlgebra dim = 4 hdims = 10 Ls = [ AffineCoupling(dim, hdims, 1:2), AffineCoupling(dim, hdims, 3:4), AffineCoupling(dim, hdims, 1:2), AffineCoupling(dim, hdims, 3:4), ] ts = reduce(∘, Ls) q₀ = MvNormal(zeros(Float32, dim), I) flow = Bijectors.transformed(q₀, ts) ``` value = ArgumentError: Package Distributions not found in current path. - Run `import Pkg; Pkg.add("Distributions")` to install the Distributions package.
Documentation: ../../../.julia/packages/Documenter/bYYzK/src/Utilities/Utilities.jl#L34
failed to run `@example` block in src/customized_layer.md:169-171 ```@example afc x = rand(flow, 10) ``` value = UndefVarError: `flow` not defined
Documentation: ../../../.julia/packages/Documenter/bYYzK/src/Utilities/Utilities.jl#L34
failed to run `@example` block in src/customized_layer.md:173-175 ```@example afc logpdf(flow, x[:,1]) ``` value = UndefVarError: `flow` not defined