SetTensor sets the tensor. Must call Update after this.
(tsr tensor.Tensor)
| 206 | |
| 207 | // SetTensor sets the tensor. Must call Update after this. |
| 208 | func (tg *TensorGrid) SetTensor(tsr tensor.Tensor) *TensorGrid { |
| 209 | if _, ok := tsr.(*tensor.String); ok { |
| 210 | log.Printf("TensorGrid: String tensors cannot be displayed using TensorGrid\n") |
| 211 | return tg |
| 212 | } |
| 213 | tg.Tensor = tsr |
| 214 | if tg.Tensor != nil { |
| 215 | tg.Display.FromMeta(tg.Tensor) |
| 216 | } |
| 217 | return tg |
| 218 | } |
| 219 | |
| 220 | // OpenTensorView pulls up a TensorView of our tensor |
| 221 | func (tg *TensorGrid) OpenTensorView() { |
no test coverage detected