You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if np.random.uniform() < P1:
# Move towards local elite
population[k] = self._turn(
local_elites[k],
population[k],
turn_prob,
initial_result.attacked_text,
)
if np.random.uniform() < P2:
# Move towards global elite
population[k] = self._turn(
global_elite,
population[k],
turn_prob,
initial_result.attacked_text,
)
In this code block: textattack.search_method class ParticleSwarmOptimization(PopulationBasedSearch).perform_search()
But it doesn’t match the input of another function: ParticleSwarmOptimization._turn
its input param = source_text, target_text, prob, original_text, above code the input param are in the order of local_elites[k] and population[k], is this right?
The text was updated successfully, but these errors were encountered:
In this code block: textattack.search_method class ParticleSwarmOptimization(PopulationBasedSearch).perform_search()
But it doesn’t match the input of another function: ParticleSwarmOptimization._turn
its input param = source_text, target_text, prob, original_text, above code the input param are in the order of local_elites[k] and population[k], is this right?
The text was updated successfully, but these errors were encountered: