Thanks for your reply.
I read the link again in my post and understood that he passed multiple inputs using the dictionary to two basic networks, which were defined by nn.Sequential.
I tried to feed (input1, input2) without using the dictionary and got the same error message.
In my case, I have two images having different size and want to simultaneously feed these images to a denseblock of the densenet as an input.
I searched for the solution, but there is no satisfying answer.