A high-performance FPGA architecture for restricted boltzmann machines