DuDu
DuDu
click this link: https://github.com/yajian/bert/blob/master/model_exporter.py
model: original model model_q: quantized model for ly in model.layers: name = 'quant_' + ly.name if len(ly.variables) > 0: lly = model_q.get_layer(name) for var in ly.variables: for vvar in lly.variables:...
quant_model.load_weights(model_path)
you can see the function: torch.nn.BCEWithLogitsLoss()
setup falied.