diff --git a/ts/print.go b/ts/print.go index d26637a..fd4dd38 100644 --- a/ts/print.go +++ b/ts/print.go @@ -319,13 +319,15 @@ func (ts *Tensor) Format(s fmt.State, verb rune) { strides := shapeToStrides(shape) device := ts.MustDevice() dtype := ts.DType().String() + defined := ts.MustDefined() if verb == 'i' { fmt.Fprintf( s, - "\nTENSOR META:\n\tShape:\t\t%v\n\tDType:\t\t%v\n\tDevice:\t\t%v\n", + "\nTENSOR INFO:\n\tShape:\t\t%v\n\tDType:\t\t%v\n\tDevice:\t\t%v\n\tDefined:\t%v\n", shape, dtype, device, + defined, ) return } diff --git a/ts/print_test.go b/ts/print_test.go index 07fbf05..681d24d 100644 --- a/ts/print_test.go +++ b/ts/print_test.go @@ -15,5 +15,7 @@ func TestTensor_Format(t *testing.T) { x := ts.MustArange(ts.IntScalar(numels), gotch.Float, gotch.CPU).MustView(shape, true) fmt.Printf("%0.1f", x) // print truncated data + fmt.Printf("%i", x) // print truncated data + // fmt.Printf("%#0.1f", x) // print full data }