MCPcopy
hub / github.com/galeone/tfgo / Check

Method Check

tensor.go:46–51  ·  view source on GitHub ↗

Check checks if the previous operation caused an error and thus tensor.Path.Err is not nil. If it's not, panics because we're defining the graph in a wrong way

()

Source from the content-addressed store, hash-verified

44// and thus tensor.Path.Err is not nil.
45// If it's not, panics because we're defining the graph in a wrong way
46func (tensor *Tensor) Check() {
47 err := tensor.Path.Err()
48 if err != nil {
49 panic(err.Error())
50 }
51}
52
53// Scope returns the scope associated to the tensor
54func (tensor *Tensor) Scope() *op.Scope {

Callers 15

CloneMethod · 0.95
CastMethod · 0.95
AddMethod · 0.95
MulMethod · 0.95
MatMulMethod · 0.95
PowMethod · 0.95
SquareMethod · 0.95
SqrtMethod · 0.95
TestTensorFunction · 0.95
TestTensorPanicFunction · 0.95
ValueMethod · 0.80
ScaleMethod · 0.80

Calls

no outgoing calls

Tested by 2

TestTensorFunction · 0.76
TestTensorPanicFunction · 0.76