If there is many inputs, how to write input?
Thanks for your work.I know the normal usage is tw.draw_model(model,[1,3,224,224]).However,If the model has many inputs,what is the right style? I have tried tw.draw_model(model,([input1],[input2])) and tw.draw_model(model,[[input1],[input2]]) ,no one is right.
can tw.draw_model only draw models for only one input? Or There is something wrong in my using?Sincerely for your reply.
I also have the same needs. Is it solved?
Is there anybody who can hlep use with this issue?
Same question,
Hey guys, I may solve this problem by input a composed tensor and split it into several inputs before the forward process begin.
Like call tensorwatch by tw.draw_model(model, [2,1,3,224,224]), and add torch.split in forward function of your model, which split tensor([2,1,3,224,224]) into tensor([1,3,224,224]) and tensor([1,3,224,224])
Hey guys, I may solve this problem by input a composed tensor and split it into several inputs before the forward process begin. Like call tensorwatch by
tw.draw_model(model, [2,1,3,224,224]), and add torch.split inforwardfunction of your model, which split tensor([2,1,3,224,224]) into tensor([1,3,224,224]) and tensor([1,3,224,224])
What if we need two inputs with different shape? For example, if our inputs are [1, 3, 224, 224] and [1, 3, 112, 112]?
Hey guys, I may solve this problem by input a composed tensor and split it into several inputs before the forward process begin. Like call tensorwatch by
tw.draw_model(model, [2,1,3,224,224]), and add torch.split inforwardfunction of your model, which split tensor([2,1,3,224,224]) into tensor([1,3,224,224]) and tensor([1,3,224,224])What if we need two inputs with different shape? For example, if our inputs are [1, 3, 224, 224] and [1, 3, 112, 112]?
Just input [1, 15, 112, 112], then divide it into [1, 12, 112, 112] and [1, 3, 112, 112] along the second dimension. The first tensor can be reshaped/viewed to [1, 3, 224, 224] as you need.