MCPcopy Index your code
hub / github.com/QData/TextAttack / attack_keras_parallel.py

File attack_keras_parallel.py

examples/attack/attack_keras_parallel.py:None–None  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1"""
2Recent upgrade of keras versions in TF 2.5+, keras has been moved to tf.keras
3This has resulted in certain exceptions when keras models are attacked in parallel
4This script fixes this behavior by adding an official hotfix for this situation detailed here:

Callers

nothing calls this directly

Calls 8

HuggingFaceDatasetClass · 0.90
AttackArgsClass · 0.90
AttackerClass · 0.90
make_keras_picklableFunction · 0.85
transformFunction · 0.85
attack_datasetMethod · 0.80
buildMethod · 0.45

Tested by

no test coverage detected