Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save daniil-lyakhov/5e126c6321dfc4c4236246ec0b03251d to your computer and use it in GitHub Desktop.
Save daniil-lyakhov/5e126c6321dfc4c4236246ec0b03251d to your computer and use it in GitHub Desktop.
import xml.etree.ElementTree as ET
root = ET.parse('openvino.xml').getroot()
layers = root[0]
for idx, l in enumerate(layers):
if l.get('type') == 'Interpolate':
if layers[idx + 1].get('type') in ['Add', 'Multiply']:
print(layers[idx + 1].get('name'))#, layers[idx + 1].get('type'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment