Skip to content

Conversation

@NiklasGustafsson
Copy link
Contributor

@kaiidams, @lostmsu -- here's another version. This adds interfaces to Katsuya's version. The interface is useful for Sequential composition. It also helps make ScriptModule more general.

/// This class is used to represent a Sequential module.
/// </summary>
public class Sequential : torch.nn.Module
public class Sequential : torch.nn.Module<Tensor, Tensor>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I mentioned in the discussion, it would make sense for a Sequential<T>: Module<T, T>

@NiklasGustafsson NiklasGustafsson marked this pull request as ready for review October 3, 2022 17:58
@NiklasGustafsson
Copy link
Contributor Author

Thank you @kaiidams for demonstrating the value of using generics, and thank you @lostmsu for reviewing the draft. It's ready for review now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Executing a TorchScript that returns multiple values, throws an excetion forward() should take a variable-length list of arguments

3 participants