vela: Move special error cases

Due to an issue with potential cyclical imports, especially when running
individual parts of vela standalone for example with pytest, the
specialised error functions are moved out of errors.py to their
respective locations.
The use of getattr over isinstance prevents the need to import the
tensor/operator class causing the cyclical import issue.

Signed-off-by: Michael McGeagh <michael.mcgeagh@arm.com>
Change-Id: If8cee4b1a2562660c6a47e1c7aeb5d7fd4dd1fca
diff --git a/ethosu/vela/tflite_reader.py b/ethosu/vela/tflite_reader.py
index eff702b..21ff887 100644
--- a/ethosu/vela/tflite_reader.py
+++ b/ethosu/vela/tflite_reader.py
@@ -20,7 +20,6 @@
 import numpy as np
 
 from .errors import InputFileError
-from .errors import TensorError
 from .nn_graph import Graph
 from .nn_graph import Subgraph
 from .operation import create_activation_function
@@ -77,7 +76,7 @@
         # Fix up tensors without operations. Generate either Placeholder or Constant ops
         for tens in self.inputs:
             if tens.ops != []:
-                TensorError(tens, "This subgraph input tensor has unexpected driving operators.")
+                tens.error("This subgraph input tensor has unexpected driving operators.")
 
             op = Operation(Op.Placeholder, tens.name)
             op.set_output_tensor(tens)