Dynamic And Self Adapting Hardware Framework For Deep Learning Architectures