ONE - On-device Neural Engine
|
Variables | |
parser = argparse.ArgumentParser() | |
type | |
str | |
required | |
int | |
args = parser.parse_args() | |
model = args.model | |
num_data = args.num_data | |
output_path = args.output | |
buf = f.read() | |
circle_model = Model.GetRootAsModel(buf, 0) | |
graph = circle_model.Subgraphs(0) | |
inputs = graph.InputsAsNumpy() | |
h5_file = h5.File(output_path, 'w') | |
group = h5_file.create_group("value") | |
sample = group.create_group(str(i)) | |
input_index = inputs[j] | |
tensor = graph.Tensors(input_index) | |
g = RandomDataGenerator(tensor.ShapeAsNumpy()) | |
input_data = g.gen(tensor.Type()) | |
data | |
GenH5RandomInputs.args = parser.parse_args() |
Definition at line 36 of file GenH5RandomInputs.py.
GenH5RandomInputs.buf = f.read() |
Definition at line 43 of file GenH5RandomInputs.py.
GenH5RandomInputs.circle_model = Model.GetRootAsModel(buf, 0) |
Definition at line 44 of file GenH5RandomInputs.py.
GenH5RandomInputs.data |
Definition at line 64 of file GenH5RandomInputs.py.
GenH5RandomInputs.g = RandomDataGenerator(tensor.ShapeAsNumpy()) |
Definition at line 62 of file GenH5RandomInputs.py.
GenH5RandomInputs.graph = circle_model.Subgraphs(0) |
Definition at line 48 of file GenH5RandomInputs.py.
GenH5RandomInputs.group = h5_file.create_group("value") |
Definition at line 53 of file GenH5RandomInputs.py.
GenH5RandomInputs.h5_file = h5.File(output_path, 'w') |
Definition at line 52 of file GenH5RandomInputs.py.
GenH5RandomInputs.input_data = g.gen(tensor.Type()) |
Definition at line 63 of file GenH5RandomInputs.py.
GenH5RandomInputs.input_index = inputs[j] |
Definition at line 60 of file GenH5RandomInputs.py.
GenH5RandomInputs.inputs = graph.InputsAsNumpy() |
Definition at line 49 of file GenH5RandomInputs.py.
GenH5RandomInputs.int |
Definition at line 34 of file GenH5RandomInputs.py.
GenH5RandomInputs.model = args.model |
Definition at line 38 of file GenH5RandomInputs.py.
GenH5RandomInputs.num_data = args.num_data |
Definition at line 39 of file GenH5RandomInputs.py.
GenH5RandomInputs.output_path = args.output |
Definition at line 40 of file GenH5RandomInputs.py.
GenH5RandomInputs.parser = argparse.ArgumentParser() |
Definition at line 32 of file GenH5RandomInputs.py.
GenH5RandomInputs.required |
Definition at line 33 of file GenH5RandomInputs.py.
GenH5RandomInputs.sample = group.create_group(str(i)) |
Definition at line 58 of file GenH5RandomInputs.py.
GenH5RandomInputs.str |
Definition at line 33 of file GenH5RandomInputs.py.
GenH5RandomInputs.tensor = graph.Tensors(input_index) |
Definition at line 61 of file GenH5RandomInputs.py.
GenH5RandomInputs.type |
Definition at line 33 of file GenH5RandomInputs.py.