| 223 | } |
| 224 | |
| 225 | static Status New(const TensorTieDef& def, TensorObject internal_object, |
| 226 | TensorObjectConverterBuilder* converter_builder, |
| 227 | Environment* env, std::unique_ptr<TensorTie>* tie) { |
| 228 | auto tie_impl = absl::make_unique<TwoStepTensorTie>(def); |
| 229 | RETURN_IF_ERROR(tie_impl->Init(internal_object, converter_builder, env)); |
| 230 | *tie = std::move(tie_impl); |
| 231 | return OkStatus(); |
| 232 | } |
| 233 | |
| 234 | Status CopyToExternalObject() final { |
| 235 | RETURN_IF_ERROR(inner_tie_->CopyToExternalObject()); |