Create the bert model
(config, init_dict, network, input_tensor, input_mask)
| 307 | return out_layer |
| 308 | |
| 309 | def bert_model(config, init_dict, network, input_tensor, input_mask): |
| 310 | """ |
| 311 | Create the bert model |
| 312 | """ |
| 313 | prev_input = input_tensor |
| 314 | for layer in range(0, config.num_hidden_layers): |
| 315 | ss = "l{}_".format(layer) |
| 316 | out_layer = transformer_layer_opt(ss, config, init_dict, network, prev_input, input_mask) |
| 317 | prev_input = out_layer.get_output(0) |
| 318 | |
| 319 | if config.use_qat: |
| 320 | dr_out = init_dict["bert_encoder_final_input_quantizer_amax"] |
| 321 | set_output_range(out_layer, dr_out) |
| 322 | return prev_input |
| 323 | |
| 324 | def squad_output(prefix, config, init_dict, network, input_tensor): |
| 325 | """ |
no test coverage detected