@brief Set whether this layer is actually shared by other nets * If ShareInParallel() is true and using more than one GPU and the * net has TRAIN phase, then is_shared should be set true. */
| 111 | * net has TRAIN phase, then is_shared should be set true. |
| 112 | */ |
| 113 | inline void SetShared(bool is_shared) { |
| 114 | CHECK(ShareInParallel() || !is_shared) |
| 115 | << type() << "Layer does not support sharing."; |
| 116 | is_shared_ = is_shared; |
| 117 | } |
| 118 | |
| 119 | /** |
| 120 | * @brief Adjust the shapes of top blobs and internal buffers to accommodate |