Return the size that should be used by pack or concat op.
| 300 | |
| 301 | // Return the size that should be used by pack or concat op. |
| 302 | Status PackOrConcatSize(int32* size) { |
| 303 | mutex_lock l(mu_); |
| 304 | TF_RETURN_IF_ERROR(LockedReturnIfClosed()); |
| 305 | *size = is_grad_ ? marked_size_ : tensors_.size(); |
| 306 | return Status::OK(); |
| 307 | } |
| 308 | |
| 309 | // Once a TensorArray is being used for gradient calculations, it |
| 310 | // should be marked as no longer resizeable. |