16年9月初TensorLayer 1.2 版本发布,接着微信群里很多人在问到底更新了什么,姜哥收集了一些资料,在此总结了一下,希望有帮助。
首先关于之前网络上提到的 “为什么要开发一个新的库”,TensorLayer 在Github上做出了回复:
A frequent question regarding TensorLayer is that why do we develop a new library instead of leveraging existing ones like Keras and Tflearn. TensorLayer differentiates with those with its pursuits for flexibility and performance. A DL user may find it comfortable to bootstrap with Keras and Tflearn. These libraries provide high-level abstractions and hide engine implementation details from users. Though good for using, it becomes hard to tune and modify from the bottom, which is necessary when addressing domain-specific problems (i.e., one model does not fit all). Nevertheless, flexibility does not always come with the loss of performance. TensorLayer allows seamless distributed and heterogeneous deployment with its first-class support for thr TensorFlow runtime.
大概意思就是说TensorLayer 强调高效率和灵活性,它的设计哲学是希望打造一个从入门到精通,都可以用同一个库。
主要的更新有2个:
- Add the support for creating a dynamic neural network. Example is here
- Add the support of using namespaces to control the variable scope in TensorFlow.
第二个更新充分利用了 TensorFlow variable scope 来控制 parameters sharing,在构建复杂网络时非常方便。
另外从TensorLayer 的设计哲学上讲,这两个更新主要面向中级用户:
beginner:Mass tutorial / Easy to use
Intermediate user: Flexibility / Transparency
Advanced user: Performance / Cross-platform
此外,1.2版本对可视化做了优化,无论是 TensorBoard 还是 Terminal 中,都更好地显示了模型信息。