Created
February 12, 2019 11:11
-
-
Save utilForever/1e0a93263ff5d52ae35304906e9c980a to your computer and use it in GitHub Desktop.
CubbyDNN graph sample code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Tensor = Tensor<float>; | |
Graph g; | |
auto& input = g.Input(TensorShape(64, 32)); | |
auto& oneHot = g.Reshape(input, TensorShape(1, 2048)); | |
auto& output = g.DropOut(oneHot, 10); | |
auto& answer = g.Max(result); | |
for (int i = 0; i < trainNum; ++i) | |
{ | |
data = LoadData("dataPath"); | |
g.ImportData(data[i]); | |
Tensor answer = g.Run(); | |
std::cout << "the answer is" << answer << std::endl; | |
} |
@Ravenwater I have not yet decided what operations are required in Graph
class. I referenced test code in the following library.
https://github.com/AcrylicShrimp/TinNet/blob/master/Example_Graph_Basic/Run.cpp
I'm curious about it you are suggesting. This part needs a lot of discussion and I want to take a few comments and go a little better.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For example,