// Run executes given method with tensors as input
Run executes given method with tensors as input
// Run executes given method with tensors as input
func (m *JITModuleMethod) Run(inputs ...interface{}) (interface{}, error) {
	ivalues := make([]C.Torch_IValue, len(inputs))
	for i, t := range inputs {
		var err error
		ivalues[i], err = convertGoValueToIValue(t)
		if err != nil {
			return nil, err
		}
	}
	defer freeIValues(ivalues)
	var iValuePtr *C.Torch_IValue
	if len(ivalues) > 0 {
		iValuePtr = (*C.Torch_IValue)(&ivalues[0])
	}
	var cErr C.Torch_Error
	ival := C.Torch_JITModuleMethodRun(
		m.context,
		iValuePtr,
		C.ulong(len(ivalues)),
		&cErr,
	)
	if err := checkError(cErr); err != nil {
		return nil, err
	}
	defer freeIValues([]C.Torch_IValue{ival})
	runtime.KeepAlive(inputs)
	return convertIValueToGoType(ival)
}
func ( m * JITModuleMethod ) Run ( inputs ... interface { } ) ( interface { } , error ) { ivalues := make ( [ ] C . Torch_IValue , len ( inputs ) ) for i , t := range inputs { var err error ivalues [ i ] , err = convertGoValueToIValue ( t ) if err != nil { return nil , err } } defer freeIValues ( ivalues ) var iValuePtr * C . Torch_IValue if len ( ivalues ) > 0 { iValuePtr = ( * C . Torch_IValue ) ( & ivalues [ 0 ] ) } var cErr C . Torch_Error ival := C . Torch_JITModuleMethodRun ( m . context , iValuePtr , C . ulong ( len ( ivalues ) ) , & cErr , ) if err := checkError ( cErr ) ; err != nil { return nil , err } defer freeIValues ( [ ] C . Torch_IValue { ival } ) runtime . KeepAlive ( inputs ) return convertIValueToGoType ( ival ) }
Run executes given method with tensors as input
Run executes given method with tensors as input