|
{ |
|
"vocab_size": 30522, |
|
"hidden_size": 768, |
|
"num_hidden_layers": 12, |
|
"num_attention_heads": 12, |
|
"intermediate_size": 3072, |
|
"hidden_act": "gelu", |
|
"hidden_dropout_prob": 0.1, |
|
"attention_probs_dropout_prob": 0.1, |
|
"max_position_embeddings": 512, |
|
"type_vocab_size": 2, |
|
"initializer_range": 0.02, |
|
"layers": [ |
|
{ |
|
"class_name": "InputLayer", |
|
"config": { |
|
"batch_input_shape": [ |
|
null, |
|
160 |
|
], |
|
"dtype": "float32", |
|
"sparse": false, |
|
"ragged": false, |
|
"name": "input_word_ids" |
|
} |
|
}, |
|
{ |
|
"class_name": "InputLayer", |
|
"config": { |
|
"batch_input_shape": [ |
|
null, |
|
160 |
|
], |
|
"dtype": "float32", |
|
"sparse": false, |
|
"ragged": false, |
|
"name": "input_mask" |
|
} |
|
}, |
|
{ |
|
"class_name": "InputLayer", |
|
"config": { |
|
"batch_input_shape": [ |
|
null, |
|
160 |
|
], |
|
"dtype": "float32", |
|
"sparse": false, |
|
"ragged": false, |
|
"name": "segment_ids" |
|
} |
|
}, |
|
{ |
|
"class_name": "KerasLayer", |
|
"config": { |
|
"name": "keras_layer", |
|
"trainable": true, |
|
"dtype": "float32", |
|
"layer_config": { |
|
"class_name": "TFRobertaModel", |
|
"config": { |
|
"vocab_size": 30522, |
|
"hidden_size": 768, |
|
"num_hidden_layers": 12, |
|
"num_attention_heads": 12, |
|
"intermediate_size": 3072, |
|
"hidden_act": "gelu", |
|
"hidden_dropout_prob": 0.1, |
|
"attention_probs_dropout_prob": 0.1, |
|
"max_position_embeddings": 512, |
|
"type_vocab_size": 2, |
|
"initializer_range": 0.02, |
|
"architectures": [ |
|
"TFRobertaModel" |
|
] |
|
} |
|
}, |
|
"class_name": "TFRobertaModel", |
|
"config": { |
|
"vocab_size": 30522, |
|
"hidden_size": 768, |
|
"num_hidden_layers": 12, |
|
"num_attention_heads": 12, |
|
"intermediate_size": 3072, |
|
"hidden_act": "gelu", |
|
"hidden_dropout_prob": 0.1, |
|
"attention_probs_dropout_prob": 0.1, |
|
"max_position_embeddings": 512, |
|
"type_vocab_size": 2, |
|
"initializer_range": 0.02, |
|
"architectures": [ |
|
"TFRobertaModel" |
|
] |
|
} |
|
} |
|
}, |
|
{ |
|
"class_name": "TensorSliceOp", |
|
"config": { |
|
"name": "tf.__operators__.getitem", |
|
"trainable": true, |
|
"dtype": "float32", |
|
"axis": 0 |
|
} |
|
}, |
|
{ |
|
"class_name": "Dense", |
|
"config": { |
|
"name": "dense", |
|
"trainable": true, |
|
"dtype": "float32", |
|
"units": 1, |
|
"activation": "linear", |
|
"use_bias": true, |
|
"kernel_initializer": { |
|
"class_name": "GlorotUniform", |
|
"config": { |
|
"seed": null |
|
} |
|
}, |
|
"bias_initializer": { |
|
"class_name": "Zeros", |
|
"config": {} |
|
}, |
|
"kernel_regularizer": null, |
|
"bias_regularizer": null, |
|
"activity_regularizer": null, |
|
"kernel_constraint": null, |
|
"bias_constraint": null |
|
} |
|
} |
|
], |
|
"input_layers": [ |
|
[ |
|
"input_word_ids", |
|
0, |
|
0 |
|
], |
|
[ |
|
"input_mask", |
|
0, |
|
0 |
|
], |
|
[ |
|
"segment_ids", |
|
0, |
|
0 |
|
] |
|
], |
|
"output_layers": [ |
|
[ |
|
"dense", |
|
0, |
|
0 |
|
] |
|
] |
|
} |
|
|