tensorflow/c/experimental/saved_model/core/ops/restore_ops.cc
// Creates a scalar string tensorhandle containing a single string `s`
Creates a scalar string tensorhandle containing a single string `s`
Creates a scalar string tensorhandle containing a single string ` s `
Status CreateStringScalarTensorHandle(ImmediateExecutionContext* ctx,
                                      const std::string& s,
                                      ImmediateTensorHandlePtr* out) {
  AbstractTensorPtr tensor(ctx->CreateStringScalar(s));
  if (tensor.get() == nullptr) {
    return errors::Internal(
        "Failed to create scalar string tensor for checkpoint restore");
  }
  out->reset(ctx->CreateLocalHandle(tensor.get()));
  return Status();
}
Status CreateStringScalarTensorHandle ( ImmediateExecutionContext * ctx , const std :: string & s , ImmediateTensorHandlePtr * out ) { AbstractTensorPtr tensor ( ctx -> CreateStringScalar ( s ) ) ; if ( tensor . get ( ) == nullptr ) { return errors :: Internal ( " " ) ; } out -> reset ( ctx -> CreateLocalHandle ( tensor . get ( ) ) ) ; return Status ( ) ; }
Creates a scalar string tensorhandle containing a single string `s`
Creates a scalar string tensorhandle containing a single string ` s `