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

Shape information is not plotted #65

Open
andraspalffy opened this issue Jan 17, 2020 · 2 comments
Open

Shape information is not plotted #65

andraspalffy opened this issue Jan 17, 2020 · 2 comments

Comments

@andraspalffy
Copy link

andraspalffy commented Jan 17, 2020

    def plot_network(self, model, hltrans, input_size = [1, 1, 36]):
        
        graph = hl.build_graph(model, torch.zeros(input_size).double())
        #model = torchvision.models.vgg16()
        #graph = hl.build_graph(model, torch.zeros([1, 3, 224, 224]))

        dot=graph.build_dot()
        dot.format="png"
        im=dot.render(cleanup=True)
        net_img=plt.imread(im)

I have a custom pytorch model, which is plotted with the function above. If I use my model, the shape information is not plotted on the lines connecting the blocks. If I uncomment the vgg16 line, and overwrite the model, the plot contains the shape information.

Can you help me pinpoint the difference? Here is the two output images (cropped).

image

Digraph gv

@peterqtr11
Copy link

@paland3 : have you solved this problem? if yes, could you please share the way you solve. @waleedka can you please help us

@HaoLuo2627
Copy link

This solution works for me. I hope this helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants