Skip to content

Instantly share code, notes, and snippets.

@rmccorm4
Last active May 10, 2020 21:43
Show Gist options
  • Select an option

  • Save rmccorm4/a97b4e82b085dae37f9625547e79b96b to your computer and use it in GitHub Desktop.

Select an option

Save rmccorm4/a97b4e82b085dae37f9625547e79b96b to your computer and use it in GitHub Desktop.

Revisions

  1. rmccorm4 renamed this gist May 10, 2020. 1 changed file with 0 additions and 0 deletions.
  2. rmccorm4 renamed this gist May 10, 2020. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  3. rmccorm4 revised this gist May 10, 2020. 1 changed file with 4 additions and 4 deletions.
    8 changes: 4 additions & 4 deletions optimization_profile.dict
    Original file line number Diff line number Diff line change
    @@ -5,8 +5,8 @@
    {
    'binding_dtype': DataType.FLOAT,
    'binding_index': 0,
    'binding_name': 'actual_input_1', # network.get_binding_name(binding_index)
    'binding_shape': (-1, 3, 224, 224), # network.get_binding_shape(binding_index)
    'binding_name': 'actual_input_1', # context.get_binding_name(binding_index)
    'binding_shape': (-1, 3, 224, 224), # context.get_binding_shape(binding_index)
    'binding_type': 'INPUT', # engine.binding_is_input(binding_index) == True
    'profile': 0,
    'profile_shape': [(1, 3, 224, 224), # min
    @@ -17,8 +17,8 @@
    {
    'binding_dtype': DataType.FLOAT,
    'binding_index': 1,
    'binding_name': 'output1', # network.get_binding_name(binding_index)
    'binding_shape': (-1, 1000), # network.get_binding_shape(binding_index)
    'binding_name': 'output1', # context.get_binding_name(binding_index)
    'binding_shape': (-1, 1000), # context.get_binding_shape(binding_index)
    'binding_type': 'OUTPUT', # engine.binding_is_input(binding_index) == False
    'profile': 0
    }
  4. rmccorm4 revised this gist May 10, 2020. 1 changed file with 6 additions and 6 deletions.
    12 changes: 6 additions & 6 deletions optimization_profile.dict
    Original file line number Diff line number Diff line change
    @@ -5,9 +5,9 @@
    {
    'binding_dtype': DataType.FLOAT,
    'binding_index': 0,
    'binding_name': 'actual_input_1', # network.get_input(0).name
    'binding_shape': (-1, 3, 224, 224), # network.get_input(0).shape
    'binding_type': 'INPUT', # engine.binding_is_input(binding_index)
    'binding_name': 'actual_input_1', # network.get_binding_name(binding_index)
    'binding_shape': (-1, 3, 224, 224), # network.get_binding_shape(binding_index)
    'binding_type': 'INPUT', # engine.binding_is_input(binding_index) == True
    'profile': 0,
    'profile_shape': [(1, 3, 224, 224), # min
    (32, 3, 224, 224), # opt
    @@ -17,9 +17,9 @@
    {
    'binding_dtype': DataType.FLOAT,
    'binding_index': 1,
    'binding_name': 'output1', # Original model's output name
    'binding_shape': (-1, 1000), # Original model's output shape
    'binding_type': 'OUTPUT',
    'binding_name': 'output1', # network.get_binding_name(binding_index)
    'binding_shape': (-1, 1000), # network.get_binding_shape(binding_index)
    'binding_type': 'OUTPUT', # engine.binding_is_input(binding_index) == False
    'profile': 0
    }
    },
  5. rmccorm4 renamed this gist May 10, 2020. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  6. rmccorm4 created this gist May 10, 2020.
    50 changes: 50 additions & 0 deletions optimization_profile.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,50 @@
    {
    'Profile 0':
    {
    'actual_input_1':
    {
    'binding_dtype': DataType.FLOAT,
    'binding_index': 0,
    'binding_name': 'actual_input_1', # network.get_input(0).name
    'binding_shape': (-1, 3, 224, 224), # network.get_input(0).shape
    'binding_type': 'INPUT', # engine.binding_is_input(binding_index)
    'profile': 0,
    'profile_shape': [(1, 3, 224, 224), # min
    (32, 3, 224, 224), # opt
    (32, 3, 224, 224)] # max
    },
    'output1':
    {
    'binding_dtype': DataType.FLOAT,
    'binding_index': 1,
    'binding_name': 'output1', # Original model's output name
    'binding_shape': (-1, 1000), # Original model's output shape
    'binding_type': 'OUTPUT',
    'profile': 0
    }
    },
    'Profile 1':
    {
    'actual_input_1 [profile 1]':
    {
    'binding_dtype': DataType.FLOAT,
    'binding_index': 2,
    'binding_name': 'actual_input_1 [profile 1]',
    'binding_shape': (-1, 3, 224, 224),
    'binding_type': 'INPUT',
    'profile': 1,
    'profile_shape': [(32, 3, 224, 224),
    (64, 3, 224, 224),
    (64, 3, 224, 224)]
    },
    'output1 [profile 1]':
    {
    'binding_dtype': DataType.FLOAT,
    'binding_index': 3,
    'binding_name': 'output1 [profile 1]',
    'binding_shape': (-1, 1000),
    'binding_type': 'OUTPUT',
    'profile': 1
    }
    }
    }