* @brief Returns the scalar loss associated with a top blob at a given index. */
| 197 | * @brief Returns the scalar loss associated with a top blob at a given index. |
| 198 | */ |
| 199 | inline Dtype loss(const int top_index) const { |
| 200 | return (loss_.size() > top_index) ? loss_[top_index] : Dtype(0); |
| 201 | } |
| 202 | |
| 203 | /** |
| 204 | * @brief Sets the loss associated with a top blob at a given index. |