You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to visualize the M2Det network, using the following code.
from configs.CC import Config
from layers.functions import Detect, PriorBox
from m2det import build_net
from tensorboardX import SummaryWriter
from torch.autograd import Variable
from utils.core import *
cfg = Config.fromfile('configs/m2det512_vgg.py')
net = build_net('test',
size = cfg.model.input_size,
config = cfg.model.m2det_config)
dummy_input = torch.rand(13, 3, 512, 512)
with SummaryWriter(comment='M2Det') as w:
w.add_graph(net, (dummy_input, ))
It would raise the error TypeError: conv2d(): argument 'input' (position 1) must be Tensor, not tuple
but when I change the last line to w.add_graph(net, dummy_input)
it would raise ValueError: Auto nesting doesn't know how to process an input object of type str. Accepted types: Tensors, or lists/tuples of them
Anyone have the experience to visualize the network structure? Please help me , Thx
The text was updated successfully, but these errors were encountered:
chr10003566
changed the title
Has anyone use tensorboardX visualized network structure? Some problem about the process of visualizing.
Has anyone use tensorboardX to visualize network structure? Some problem about the process of visualizing.
Apr 16, 2019
hi, You can modify some codes in m2det.py to solve this problem. From:
self.leach = nn.ModuleList([BasicConv(
deep_out+shallow_out,
self.planes//2,
kernel_size=(1, 1), stride=(1, 1))]*self.num_levels) To:
self.leach = nn.ModuleList([BasicConv(
deep_out+shallow_out,
self.planes//2,
kernel_size=(1, 1), stride=(1, 1)) for _ in range(self.num_levels)])
I want to visualize the M2Det network, using the following code.
It would raise the error
TypeError: conv2d(): argument 'input' (position 1) must be Tensor, not tuple
but when I change the last line to
w.add_graph(net, dummy_input)
it would raise
ValueError: Auto nesting doesn't know how to process an input object of type str. Accepted types: Tensors, or lists/tuples of them
Anyone have the experience to visualize the network structure? Please help me , Thx
The text was updated successfully, but these errors were encountered: