* @brief Implements common layer setup functionality. * * @param bottom the preshaped input blobs * @param top * the allocated but unshaped output blobs, to be shaped by Reshape * * Checks that the number of bottom and top blobs is correct. * Calls LayerSetUp to do special layer setup for individual layer types, * followed by Reshape to set up sizes of top blobs and int
| 65 | * This method may not be overridden. |
| 66 | */ |
| 67 | void SetUp(const vector<Blob<Dtype>*>& bottom, |
| 68 | const vector<Blob<Dtype>*>& top) { |
| 69 | InitMutex(); |
| 70 | CheckBlobCounts(bottom, top); |
| 71 | LayerSetUp(bottom, top); |
| 72 | Reshape(bottom, top); |
| 73 | SetLossWeights(top); |
| 74 | } |
| 75 | |
| 76 | /** |
| 77 | * @brief Does layer-specific setup: your layer should implement this function |
no outgoing calls