Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
layer_list.append(layer)
input_layer = {}
input_layer['name'] = 'input1'
input_layer['class_name'] = 'InputLayer'
input_layer['input_shape'] = [layer_list[0]['n_in']]
layer_list.insert(0, input_layer)
#################
## Generate HLS
#################
reader = PyTorchDataReader(yamlConfig)
print('Creating HLS model')
hls_model = HLSModel(yamlConfig, reader, layer_list)
optimizers = ['eliminate_linear_activation', 'merge_batch_norm_quantized_tanh', 'quantize_dense_output']
optimize_model(hls_model, optimizers)
return hls_model