File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -219,7 +219,7 @@ This model was trained for 8 epochs using the full text of The Time Machine nove
219219
220220To verify some functions more quickly, I have introduced a handwritten digit recognition program.
221221
222- `
222+ ```
223223./handwritten_recognition
224224images magic : 2051
225225label magic : 2049
@@ -230,22 +230,23 @@ Actions:
230230evaluating : [10000/10000] correct : 9501
231231epoch : 9 [50000/50000] loss : 0.150985
232232evaluating : [10000/10000] correct : 9493
233- `
233+ ```
234234
235235### graphviz supported
236236
237237You can add a line of code like this to the program to output an out.dot file that records the tensor computation topology. For example, in mnist.cpp:
238- `
238+
239+ ```
239240printAllActions();
240241printDotGraph(); // here
241242allocMemAndInitTensors();
242- `
243+ ```
243244
244245If you have Graphviz installed, you can use the following command to convert the out.dot file into a PNG image:
245246
246- `
247+ ```
247248dot -Tpng out.dot -o out.png
248- `
249+ ```
249250
250251Here's an example from my side where a PNG file is generated as output.
251252
You can’t perform that action at this time.
0 commit comments