For binary units, that converts to bool/Int and will not hit blas in the product vflat * hflat'. This is not good because that product reduces over batches and should be faster with BLAS.
In general, activations_convert should probably convert to the weight eltype always. ... and to support CUDA perhaps use the array type of the weigths.
https://github.com/cossio/RestrictedBoltzmannMachines.jl/blob/f71a30cc6e7cadeb5897fe10e089ef2a22c88736/src/rbm.jl#L310-L311
For binary units, that converts to bool/Int and will not hit blas in the product
vflat * hflat'
. This is not good because that product reduces over batches and should be faster with BLAS.In general, activations_convert should probably convert to the weight eltype always. ... and to support CUDA perhaps use the array type of the weigths.