change(example/basic)
This commit is contained in:
parent
f961f84389
commit
013e1e710b
|
@ -6,4 +6,5 @@
|
|||
- [JIT](jit)
|
||||
- [Neural style transfer](neural-style-transfer)
|
||||
- [Transfer learning](transfer-learning)
|
||||
- [Pretrained models](pretrained-models)
|
||||
|
||||
|
|
14
example/basic/main.go
Normal file
14
example/basic/main.go
Normal file
|
@ -0,0 +1,14 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"github.com/sugarme/gotch"
|
||||
ts "github.com/sugarme/gotch/tensor"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
// Create a tensor [2,3,4]
|
||||
tensor := ts.MustArange(ts.IntScalar(2*3*4), gotch.Int64, gotch.CPU).MustView([]int64{2, 3, 4}, true)
|
||||
|
||||
tensor.Print()
|
||||
}
|
Loading…
Reference in New Issue
Block a user