tweak layout, add title
This commit is contained in:
parent
9e9942da19
commit
f0ca9f0ec6
3 changed files with 13 additions and 8 deletions
15
src/app.css
15
src/app.css
|
@ -7,11 +7,12 @@ body {
|
||||||
font-family: Ubuntu, sans-serif;
|
font-family: Ubuntu, sans-serif;
|
||||||
|
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 1fr 1fr;
|
grid-template-columns: 1fr;
|
||||||
grid-template-rows: auto 1fr auto;
|
grid-template-rows: auto 75vh 1fr auto;
|
||||||
grid-template-areas: "header header"
|
grid-template-areas: "header"
|
||||||
"left right"
|
"summary"
|
||||||
"footer footer";
|
"graph"
|
||||||
|
"footer";
|
||||||
}
|
}
|
||||||
|
|
||||||
h1 {
|
h1 {
|
||||||
|
@ -21,11 +22,11 @@ h1 {
|
||||||
}
|
}
|
||||||
|
|
||||||
#input-summary {
|
#input-summary {
|
||||||
grid-area: left;
|
grid-area: summary;
|
||||||
}
|
}
|
||||||
|
|
||||||
#output-graph {
|
#output-graph {
|
||||||
grid-area: right;
|
grid-area: graph;
|
||||||
}
|
}
|
||||||
|
|
||||||
footer {
|
footer {
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<body>
|
<body>
|
||||||
<h1>Tensorflow Summary Visualisation</h1>
|
<h1>Tensorflow Summary Visualisation</h1>
|
||||||
|
|
||||||
<textarea name="input-summary" id="input-summary"></textarea>
|
<textarea name="input-summary" id="input-summary" placeholder="Paste a tensorflow summary here"></textarea>
|
||||||
<div id="output-graph"></div>
|
<div id="output-graph"></div>
|
||||||
|
|
||||||
<footer>
|
<footer>
|
||||||
|
|
|
@ -4,6 +4,10 @@ import nomnoml from 'nomnoml';
|
||||||
|
|
||||||
export default function make_graph(summary) {
|
export default function make_graph(summary) {
|
||||||
const result = [];
|
const result = [];
|
||||||
|
|
||||||
|
result.push("#.title: visual=none title=center,bold body=center,bold");
|
||||||
|
result.push(`[<title>Model: ${summary.title}|Total params: ${summary.params}|Trainable params: ${summary.params_trainable}|Non-trainable params: ${summary.params_trainable}|${summary.layers.length} layers, ${summary.edges.length} edges]`)
|
||||||
|
|
||||||
for(const layer of summary.layers) {
|
for(const layer of summary.layers) {
|
||||||
const output_shape = layer.output_shape.replace(/\[/, "\\[")
|
const output_shape = layer.output_shape.replace(/\[/, "\\[")
|
||||||
.replace(/\]/, "\\]");
|
.replace(/\]/, "\\]");
|
||||||
|
|
Loading…
Reference in a new issue