Tensor、op相关
从api开始挖。然后再上升到框架。然后再topdown地整合。
友好小白。
1、Tensor\TensorShape
1  | //创建tensor - constructor包含TensorShape  | 
2、DeepCopy
1  | //主要两个步骤 ,在tensor_utils中  | 
类似的操作如 slice concat split等不再赘述。
3、gtest
1  | int main(int argc, char** argv) {  | 
tensorflow 的test非常多,都是基于gtest框架。
4、CreateTensorProto
1  | //同样两个部分,shape和value进行create。tensor_util.h中  | 
还有诸如CompressTensorProtoInPlace(主要是CompressRepeatedField,核心两个阈值 static const int64 kDefaultMinNumElements = 64;static const float kDefaultMinCompressionRatio = 2.0f;)。
5、protobuf
1  | //tensor、op、graph等的proto 涉及到很多protobuf操作,不赘述  | 
6、OpRegistry
1  | 
  | 
总结: 1、A `Span
2、string_view
3、# ##
4、gtest
5、initializer_list
    本文作者:
    
      yuqing wang
    
    
本文链接: https://satyrswang.github.io/2021/04/16/TensorFlow源码解读02/
版权声明: 本作品采用 知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议 进行许可。转载请注明出处!
      
      
      
        
      
    本文链接: https://satyrswang.github.io/2021/04/16/TensorFlow源码解读02/
版权声明: 本作品采用 知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议 进行许可。转载请注明出处!