Notes of A Philosophy of Software Design--Deep Modules
Chapter 4 argued that modules should be deep. Chapter 5, 6 discuss techniques for creating deep modules.
Chapter 4 argued that modules should be deep. Chapter 5, 6 discuss techniques for creating deep modules.
使用 Python 时,经常会遇到的问题是
TensorFlow 2.x在如火如荼的迭代,1.15.4是TF 1.x的稳定版本。本文介绍在Ubuntu和virtualenv的环境下的tensorflow 1.15.4源码安装过程。源码安装的一个好处是可以自定义cuda和cudnn的次级版本号,比如TF 1.15.4默认支持CUDA 10,但是pip上的预安装的tensorflow 1.15.4是基于10.0,源码安装可以自定义到10.2。
Python中多线程无法利用多核优势,如果想要充分地使用多核CPU的资源,在python中大部分情况需要使用多进程,这里最Python提供了multiprocessing。通过multiprocessing包可以实现多进程,不过因为不是多线程,无法向多线程一样方便的共享数据[因为多线程往往属于一个进程,进程内共享比较方便]。但是, multiprocessing包也提供了共享变量这样的功能。
I never believed that there is a book that can fill the gap between theory and practice, especially for system design, but I do believe that the book “A Philosophy of Software Design” is the best one that narrows the gap.
个人认为的Python虚拟环境的最佳实践。
并发[concurrency]和并行[parallelism]是两个相关但是不完全相同的概念。
数据并行[Data Parallelism]是用来解决深度学习中单批次训练数据[training batch data]过大无法放入GPU内存中的方法,其理论基础来源于分割数据进行梯度计算再合并结果并不会印象直接计算梯度的结果。所以可以将一个模型复制多份放入一台机器的多个GPU中或者多台机器的多个GPU中,然后将训练数据分割让每个GPU进行梯度计算,最后将计算结果汇总。