|
|
|
|
|
|
auto_pad = get_attr(layer, "padding") # layer.attr['padding'].s.decode("utf-8") |
|
|
|
pads = get_attr(layer, "pads") |
|
|
|
strides = get_attr(layer, "strides") # layer.attr['strides'].list.i |
|
|
|
# TODO remove? |
|
|
|
# dilations = get_attr(layer, "dilations") # layer.attr['dilations'].list.i |
|
|
|
pool_size = get_attr(layer, "ksize") # layer.attr['ksize'].list.i |
|
|
|
shape = get_attr(layer, "shape") |
|
|
|
starts = get_attr(layer, "starts") |
|
|
|
|
|
|
o_model.layers = cleanup_layers(o_model.layers) |
|
|
|
|
|
|
|
all_inputs = {i for l in o_model.layers for i in l.inputs} |
|
|
|
# TODO remove? |
|
|
|
# embedded_tensors = {t.name for l in o_model.layers for t in l.tensors} |
|
|
|
|
|
|
|
# Trim |
|
|
|
if trim_unused_by_output: |
|
|
|