Skip to content

Draw Net Problem #1709

@BestSonny

Description

@BestSonny

I try to visualize the network.But I get the errors.

AttributeError: type object 'LayerParameter' has no attribute 'LayerType'

I check the caffe caffe_pb2.py and get this:

_LAYERPARAMETER_LAYERTYPE = descriptor.EnumDescriptor(
name='LayerType',
full_name='caffe.LayerParameter.LayerType',
filename=None,
file=DESCRIPTOR,

Below is my use case:

import caffe
from caffe import draw
from caffe.proto import caffe_pb2

enddef

net = caffe_pb2.NetParameter()
with open('model/_iter_500000.caffemodel','rb') as f:
net.ParseFromString(f.read())
print net.name
draw.draw_net_to_file(net,'network.png')

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions