Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

autodiff::graphviz: make bgcolor="transparent"; for graphs. #55

Closed
avhz opened this issue Jun 24, 2023 · 3 comments
Closed

autodiff::graphviz: make bgcolor="transparent"; for graphs. #55

avhz opened this issue Jun 24, 2023 · 3 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@avhz
Copy link
Owner

avhz commented Jun 24, 2023

No description provided.

@avhz avhz added bug Something isn't working good first issue Good for newcomers labels Jun 24, 2023
@Harshal662
Copy link

I can do that

@spoloxs
Copy link

spoloxs commented Jun 25, 2023

digraph Tape {
rankdir="LR";
node [shape=box3d];
0 [label="Input: x_0, Value: 2.00", color="red"];digraph Tape {
rankdir="LR";
node [shape=box3d];
0 [label="Input: x_0, Value: 2.00", color="red"];
1 [label="Input: x_1, Value: 3.00", color="red"];
2 [label="Op: #2"];
3 [label="Op: #3"];
4 [label="Op: #4"];
0 -> 2 [label="∂_0: 3.00"];
1 -> 2 [label="∂_1: 2.00"];
2 -> 3 [label="∂_0: 403.43"];
3 -> 4 [label="∂_0: 0.26"];
}
digraph Tape {
rankdir="LR";
node [shape=box3d];
0 [label="Input: x_0, Value: 1.00", color="red"];
1 [label="Input: x_1, Value: 2.00", color="red"];
2 [label="Op: #2"];
3 [label="Op: #3"];
4 [label="Op: #4"];
0 -> 2 [label="∂_0: 2.00"];
1 -> 2 [label="∂_1: 1.00"];
1 -> 3 [label="∂_0: -0.42"];
2 -> 4 [label="∂_0: 1.00"];
3 -> 4 [label="∂_1: 1.00"];
}
digraph Tape {
rankdir="LR";
node [shape=box3d];
0 [label="Input: x_0, Value: 1.00", color="red"];
1 [label="Input: x_1, Value: 2.00", color="red"];
2 [label="Input: x_2, Value: 3.00", color="red"];
3 [label="Input: x_3, Value: 4.00", color="red"];
4 [label="Op: #4"];
5 [label="Op: #5"];
6 [label="Op: #6"];
7 [label="Op: #7"];
8 [label="Input: x_8, Value: 5.00", color="red"];
9 [label="Op: #9"];
10 [label="Op: #10"];
11 [label="Op: #11"];
12 [label="Op: #12"];
13 [label="Op: #13"];
14 [label="Op: #14"];
0 -> 4 [label="∂_0: 2.72"];
1 -> 5 [label="∂_0: 0.21"];
4 -> 6 [label="∂_0: 1.00"];
5 -> 6 [label="∂_1: 1.00"];
6 -> 7 [label="∂_0: -0.67"];
2 -> 9 [label="∂_0: 0.29"];
3 -> 10 [label="∂_0: 8.00"];
3 -> 10 [label="∂_1: 0.00"];
9 -> 11 [label="∂_0: 1.00"];
10 -> 11 [label="∂_1: 1.00"];
11 -> 12 [label="∂_0: 0.06"];
8 -> 13 [label="∂_0: 2.88"];
12 -> 13 [label="∂_1: 5.00"];
7 -> 14 [label="∂_0: 1.00"];
13 -> 14 [label="∂_1: 1.00"];
}
Gradient: [-1.8212, -0.1407, 0.0814, 2.2558, 2.8754]
1 [label="Input: x_1, Value: 3.00", color="red"];
2 [label="Op: #2"];
3 [label="Op: #3"];
4 [label="Op: #4"];
0 -> 2 [label="∂_0: 3.00"];
1 -> 2 [label="∂_1: 2.00"];
2 -> 3 [label="∂_0: 403.43"];
3 -> 4 [label="∂_0: 0.26"];
}
digraph Tape {
rankdir="LR";
node [shape=box3d];
0 [label="Input: x_0, Value: 1.00", color="red"];
1 [label="Input: x_1, Value: 2.00", color="red"];
2 [label="Op: #2"];
3 [label="Op: #3"];
4 [label="Op: #4"];
0 -> 2 [label="∂_0: 2.00"];
1 -> 2 [label="∂_1: 1.00"];
1 -> 3 [label="∂_0: -0.42"];
2 -> 4 [label="∂_0: 1.00"];
3 -> 4 [label="∂_1: 1.00"];
}
digraph Tape {
rankdir="LR";
node [shape=box3d];
0 [label="Input: x_0, Value: 1.00", color="red"];
1 [label="Input: x_1, Value: 2.00", color="red"];
2 [label="Input: x_2, Value: 3.00", color="red"];
3 [label="Input: x_3, Value: 4.00", color="red"];
4 [label="Op: #4"];
5 [label="Op: #5"];
6 [label="Op: #6"];
7 [label="Op: #7"];
8 [label="Input: x_8, Value: 5.00", color="red"];
9 [label="Op: #9"];
10 [label="Op: #10"];
11 [label="Op: #11"];
12 [label="Op: #12"];
13 [label="Op: #13"];
14 [label="Op: #14"];
0 -> 4 [label="∂_0: 2.72"];
1 -> 5 [label="∂_0: 0.21"];
4 -> 6 [label="∂_0: 1.00"];
5 -> 6 [label="∂_1: 1.00"];
6 -> 7 [label="∂_0: -0.67"];
2 -> 9 [label="∂_0: 0.29"];
3 -> 10 [label="∂_0: 8.00"];
3 -> 10 [label="∂_1: 0.00"];
9 -> 11 [label="∂_0: 1.00"];
10 -> 11 [label="∂_1: 1.00"];
11 -> 12 [label="∂_0: 0.06"];
8 -> 13 [label="∂_0: 2.88"];
12 -> 13 [label="∂_1: 5.00"];
7 -> 14 [label="∂_0: 1.00"];
13 -> 14 [label="∂_1: 1.00"];
}
Gradient: [-1.8212, -0.1407, 0.0814, 2.2558, 2.8754]

From this output I can see you are using shape=box3d which is already having transparent bg.. I don't think there is anything need for doing. If I am looking at wrong file please correct me

@avhz
Copy link
Owner Author

avhz commented Jun 25, 2023

I already made the change yesterday, just haven't pushed it yet.

The change just makes the background transparent such that if it is included in a markdown document that has a non-white background, then the Graphviz plot doesn't have a white box.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants