Documentation
¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func JPEG ¶
JPEG loads a JPEG file into a *tensor.Dense of HWC format.
Example ¶
filename := "testdata/smile.jpeg" f, err := os.Open(filename) if err != nil { fmt.Printf("ERR: %v\n", err) } t, err := JPEG(f) if err != nil { fmt.Printf("ERR: %v\n", err) } fmt.Printf("%v %v", t.Shape(), t.Dtype)
Output: (12, 14, 4) float64
func PNG ¶
PNG loads a PNG file into a *tensor.Dense of HWC format
Example ¶
filename := "testdata/smile.png" f, err := os.Open(filename) if err != nil { fmt.Printf("ERR: %v\n", err) } t, err := PNG(f) if err != nil { fmt.Printf("ERR: %v\n", err) } fmt.Printf("%v %v", t.Shape(), t.Dtype())
Output: (12, 14, 4) float64
Types ¶
Click to show internal directories.
Click to hide internal directories.