Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

*ts.CModule does not implement ts.Module interface correctly #121

Open
GoosvandenBekerom opened this issue Dec 8, 2023 · 0 comments
Open

Comments

@GoosvandenBekerom
Copy link

This GoDoc comment

gotch/ts/jit.go

Line 1188 in f45f0a7

// Forwad implements Module interface for CModule.

Implies that *ts.CModule implements the ts.Module interface.

type Module interface {
	// ModuleT
	Forward(xs *Tensor) *Tensor
}

But since it returns an error, it does not, not sure if this is an issue, but just something I noticed while trying to use CModule as a Module.

// Forwad implements Module interface for CModule.
func (cm *CModule) Forward(tensor *Tensor) (*Tensor, error) {

	var tensors []*Tensor = []*Tensor{tensor}
	return cm.ForwardTs(tensors)
}
@GoosvandenBekerom GoosvandenBekerom changed the title ts*CModule does not implement ts.Module interface correctly *ts.CModule does not implement ts.Module interface correctly Dec 8, 2023
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

No branches or pull requests

1 participant