zoukankan      html  css  js  c++  java
  • caffe源码阅读

    1. base_conv_layer:

    void ConvolutionLayer<Dtype>::compute_output_shape() {
      const int* kernel_shape_data = this->kernel_shape_.cpu_data();
      const int* stride_data = this->stride_.cpu_data();
      const int* pad_data = this->pad_.cpu_data();
      const int* dilation_data = this->dilation_.cpu_data();
      this->output_shape_.clear();
      for (int i = 0; i < this->num_spatial_axes_; ++i) {  //追溯到LayerSetUp里,可以看到通常num_spatial_axes_=2
        // i + 1 to skip channel axis
        const int input_dim = this->input_shape(i + 1);
        const int kernel_extent = dilation_data[i] * (kernel_shape_data[i] - 1) + 1;
        const int output_dim = (input_dim + 2 * pad_data[i] - kernel_extent)/ stride_data[i] + 1;
        this->output_shape_.push_back(output_dim);
      }
    }
  • 相关阅读:
    荣岩岩作业10
    荣岩岩作业9
    荣岩岩作业8
    荣岩岩作业7
    荣岩岩作业6
    荣岩岩作业5
    荣岩岩作业4
    list<T>与datatable互相转换
    IE缓存机制
    html界面添加判断
  • 原文地址:https://www.cnblogs.com/zhengmeisong/p/9202110.html
Copyright © 2011-2022 走看看