Skip to content

Commit dc73605

Browse files
committed
rm redundant comments
1 parent 862c6dc commit dc73605

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

src/flows/realnvp.jl

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ end
3939

4040
@functor AffineCoupling (s, t)
4141

42-
function AffineCoupling(
43-
dim::Int, # dimension of the problem
44-
hdims::AbstractVector{Int}, # dimension of hidden units for s and t
45-
mask_idx::AbstractVector{Int}, # indices of the transformed dimensions
42+
function AffineCoupling(
43+
dim::Int,
44+
hdims::AbstractVector{Int},
45+
mask_idx::AbstractVector{Int},
4646
paramtype::Type{T}
4747
) where {T<:AbstractFloat}
4848
cdims = length(mask_idx) # dimension of parts used to construct coupling law
@@ -130,9 +130,9 @@ Example
130130
- `y = layer(randn(4, 16))` # batched forward
131131
"""
132132
function RealNVP_layer(
133-
dims::Int, # dimension of problem
134-
hdims::AbstractVector{Int}; # dimension of hidden units for s and t
135-
paramtype::Type{T} = Float64, # type of the parameters
133+
dims::Int,
134+
hdims::AbstractVector{Int};
135+
paramtype::Type{T} = Float64,
136136
) where {T<:AbstractFloat}
137137

138138
mask_idx1 = 1:2:dims
@@ -169,12 +169,12 @@ Example
169169
"""
170170
function realnvp(
171171
q0::Distribution{Multivariate,Continuous},
172-
hdims::AbstractVector{Int}, # dimension of hidden units for s and t
173-
nlayers::Int; # number of RealNVP_layer
174-
paramtype::Type{T} = Float64, # type of the parameters
172+
hdims::AbstractVector{Int},
173+
nlayers::Int;
174+
paramtype::Type{T} = Float64,
175175
) where {T<:AbstractFloat}
176176

177-
dims = length(q0) # dimension of the reference distribution == dim of the problem
177+
dims = length(q0)
178178
Ls = [RealNVP_layer(dims, hdims; paramtype=paramtype) for _ in 1:nlayers]
179179
create_flow(Ls, q0)
180180
end

0 commit comments

Comments
 (0)