拆轮子 笔记

拆程序

[ ] 分析一个发展到半程的DL项目CXXNET

  • 开始时间
  • 源码阅读,code structure
    • coding guide
      • 格式,注释文档
    • getting started
      • src文件夹下的文件夹都有一个.h文件.这个文件是一个模块module,.h文件是模块接口interface.
      • 所有其他的-inl.hpp文件是接口的实现implementations.
        • 所有接口都是对其他模块可视的.
        • Templatized class with parameter xpu that can stands for cpu or gpu.
      • The project depends on mshadow for tensor operations.
    • 项目的逻辑布局
      • 依赖顺序:nnet->updater->layer
        • 所有模块依赖global.h and utils
        • io is an independent module
      • ayer is implementation of neural net layers and defines forward and backward propagation
      • updater is the parameter updating module,it defines update rule of weights.
        • AsyncUpdater is a special updater that handles asynchronize communication and update
        • It uses mshadow-ps to do async communication
      • nnet is the neural net structure that combines layers together to form a neural net
        • Dependency in nnet: CXXNetThreadTrainer->NeuralNetThread->NeuralNet
      • io is the input module to handle reading various data and preprocessing.
        -( io看来是数据传输模块,涉及底层的操作
        • io uses iterator pattern to handle data processing pipeline
        • The pipeline can be mult-threaded using threadbuffer trick
    • 所有的源码怎么组织工作起来.
      • 数据从io模块拉入nnet
      • nnet获得已经获取部分数据的#gpu线程,调用层对象来做forwardbackprop(forward and backward propagation)
      • 对于每个权重,更新(updater)被创建
        • AsyncUpdater.AfterBackprop is called after backprop of the corresponding layer to push out gradient
        • AsyncUPdater.UpdateWait is called before forward to the layer
        • mshadow-ps does the async trick of parameter communication
      • AsyncUpdater will call IUpdater, which does the updating trick
        • If update_on_server is on, IUpdater will be created on server-side instead
    • 文件命名惯例
  • .h files are data structures and interface
    • In each folder, there is one .h file that have same name as the folder, this file defines everything needed for other module to use this module
    • Interface headers: layer/layer.h, updater/updater.h
  • -inl.hpp files are implementations of interface, like cpp file in most project.
    • You only need to understand the interface file to understand the usage of that layer
  • In each folder, there can be a .cpp file, and .cu file that that compiles the module of that layer
    • the .cpp file and .cu file does not contain implementation, but reuse common implementation in file ends with _impl-inl.hpp

分析项目

  • automake 工具使用
    • 原因是缺少libtool,其实也是缺少aclocal等工具.
    • ?但是安装automake时已经自动安装了m4,autoconf.是否可以通过设置 m4_pattern_allow?
configure.ac:16: error: possibly undefined macro: AC_PROG_LIBTOOL

                     If this token and others are legitimate, please use m4_pattern_allow.
                     See the Autoconf documentation.
                     autoreconf: /usr/bin/autoconf failed with exit status: 1

[ ] 怎么查找错误?

源码阅读

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
SolidWorks轮子库是SolidWorks软件中用于快速创建车轮模型的预制零件库。SolidWorks是一种三维计算机辅助设计(CAD)软件,广泛用于机械设计和工程设计领域。SolidWorks轮子库为用户提供了各种各样的车轮模型,可以根据实际需求选择使用。 在SolidWorks软件中,用户可以通过直接从轮子库中选择合适的预制轮子模型来快速创建属于自己的车轮。这些预制轮子模型通常具有标准尺寸和几何形状,不仅节省了用户从零开始创建车轮模型的时间和精力,也确保了轮子的准确性和质量。 SolidWorks轮子库中的轮子模型可以进行二维和三维编辑,用户可以根据需要对其进行调整和修改,以满足不同项目的要求。例如,用户可以改变轮子的直径、宽度、辐条形状等,使其适应不同类型的车辆和用途。此外,用户还可以添加轮胎、螺母、轴承等附件,使轮子模型更加真实和完整。 通过SolidWorks轮子库,用户可以快速建立车轮模型,并将其应用于整个设计过程中。无论是进行车辆设计、机械装置设计还是产品展示,都可以方便地使用SolidWorks轮子库中的模型。此外,轮子库还提供了自动调整轮子位置和旋转的功能,使用户可以更加方便地对车辆进行布局和动画展示。 总之,SolidWorks轮子库为SolidWorks软件用户提供了丰富多样的车轮模型,使设计人员能够更加高效地创建和调整车轮模型,加快设计过程,提高设计质量。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值