Closed dfdx closed 8 years ago
Addressing each concern in order.
fit
and sample
wouldn't need to convert anything cause the input precision at that point would match the RBM's. Now obviously, if you wanted to call sample
directly with different precision then you would need to do a conversion.Does that make sense or am I missing something?
transform()
function in deep networks - what a mess it would be if we were converting data back and forth on each layer. I think if we state that, say, RBM's precision is 32 bits, then the output should always be 32 bits, regardless of the input (note that in this case we would have already lost actual precision).fit
and sample
, assuming particular implementation and workflow. If, however, call to sample
comes from some other place (e.g. fit(NewUnusualRBM)
), this assumption will be broken and it's hard to predict consequences. All in all, I'm just worried about increased number of possible workflows. On other hand, until we get to version 1.0 we are free to change API, so I'm going to give it a try anyway and then see how it goes.
_
to the beginning of private methods and types to make it visually apparent what is "public" vs "private".fit(::RBM, ::Mat{T}...)
calling sample_hiddens(::AbstractRBM, ::Mat{T})
wouldn't have any performance issues, it could if someone's fit(::NewUnusualRBM, ::Mat{T})
doesn't do the conversion and still calls sample_hiddens(::AbstractRBM, ::Mat{T})
? That does seem like a problem and I can't think of a good solution.I think generalizing the tests cases and adding benchmarks might help with handling the different workflows. I'll open an issue for that and start working on it.
Thanks.
nets.jl
. It's ok to have flow like data{Float64} -> RBM_1{Float32} -> data{Float32} -> RBM_2{Float32} -> ...
(i.e. convert data to Float32
once and pass through all RBMs), but I'd like to avoid flows like data{Float64} -> RBM_1{Float32} -> data{Float64} -> RBM_2{Float32} ->
(i.e. convert between Float32
and Float64
between each pair of RBMs). _
prefix works as a "soft private" modifier, i.e. from M import * does not import objects whose name starts with an underscore. In Julia, visibility of methods is controlled via explicit exports, so I don't see any advantage of using leading underscores in method names. At the same time, I'm not against it, so I don't mind using it for "strictly private" methods like _get_dataset
. Fixed by #33
From #19:
It sounds like a good idea, especially in a context of fitting large datasets when a user may not have possibility to convert an entire dataset in memory, but converting it on per-batch basis is still possible. However, I have some concerns reagarding this idea.
Float64
RBM, but gotFloat32
data, we would not warn him about it. As an example, Julia's BLAS function never allow implicit conversions and always demand an exact type.fit()
or all exported functions or all functions at all?sample()
function and then some overloadedfit()
method passes a data of a different type into it - this will lead to the conversion during each call tosample()
, which will significantly slow down the process without any hints for a developer / end user.Does it make sence or am I just paranoid?
cc: @Rory-Finnegan