Skip to content

New to TorchSharp: Need help with torch.nn.Module forward method overriding #1215

Answered by asieradzk
dustincoding asked this question in Q&A
Discussion options

You must be logged in to vote

You need to inherit from Module<Tensor, Tensor>

Then your inheriting class will have forward method to override

class SomeClass: Module<Tensor, Tensor>
    {
        public SomeClass(string name) : base(name)
        {
        }

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@dustincoding
Comment options

Answer selected by dustincoding
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants