Thanks for the code.
It works fine with some dumme inputs:
model = DenoisingAutoencoder(10, 10)
model(torch.randn(2, 10))

Feel free to post an executable code snippet, which could reproduce the error you are seeing.
PS: you can post code snippets by wrapping them into three backticks, which makes debugging easier.