Example to demonstrate how to work with fairly complex models using Pytorch subclassing API #386
Unanswered
SM1991CODES
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
This is a great framework. However, the examples are fairly monolithic in architecture.
They are either Sequential or have a single module representing the NN.
Is there some example that shows how to deal with networks that are made up of several blocks, each of which are modules themselves?
Example:
class Net(nn.Module):
def init(self,....):
self.enc = Encoder()
self.dec = Decoder()
self.head1 = ClassificationHead()
self.head2 = RegressionHead()
def forward():
...
class Encoder(nn.Module):
def init(self,...):
...
def forward(self, x):
...
class Decoder(nn.Module):
def init(self,...):
...
def forward(self, x):
...
This would be really useful to try out architectures for tasks like semantic segmentation and object detection.
Please help
Beta Was this translation helpful? Give feedback.
All reactions