Skip to content

Commit 14b395b

Browse files
Create session.cpp
1 parent a84a964 commit 14b395b

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

session.cpp

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#include <tensorflow/core/platform/env.h>
2+
#include <tensorflow/core/public/session.h>
3+
4+
#include <iostream>
5+
6+
using namespace std;
7+
using namespace tensorflow;
8+
9+
int main()
10+
{
11+
Session* session;
12+
Status status = NewSession(SessionOptions(), &session);
13+
if (!status.ok()) {
14+
cout << status.ToString() << "\n";
15+
return 1;
16+
}
17+
cout << "Session successfully created.\n";
18+
}

0 commit comments

Comments
 (0)