Skip to content

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

@GoosvandenBekerom

Description

@GoosvandenBekerom

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)
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions