Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
simulation.
:param nengo_to_app_graph_map: the mapping between nengo object and \
the nengo_operator_graph (a type of application graph)
:param decoder_cache: still don't know what this is for yet.
:return: the decoders ???????
"""
# fudge to support the built in nengo demanding a god object with params
model = ModelWrapper(nengo_to_app_graph_map, decoder_cache)
# gets encoders, gains, anf bias's from the application vertex
encoders = nengo_to_app_graph_map[nengo_connection.pre_obj].encoders
gain = nengo_to_app_graph_map[nengo_connection.pre_obj].gain
bias = nengo_to_app_graph_map[nengo_connection.pre_obj].bias
eval_points = nengo_connection_builder.get_eval_points(
model, nengo_connection, random_number_generator)
# TODO Figure out which version this is meant to support and use only
# TODO that one
try:
targets = nengo_connection_builder.get_targets(
model, nengo_connection, eval_points)
except: # yuck
# nengo <= 2.3.0
targets = nengo_connection_builder.get_targets(
model, nengo_connection, eval_points)
x = numpy.dot(eval_points, encoders.T / nengo_connection.pre_obj.radius)
e = None
if nengo_connection.solver.weights:
e = nengo_to_app_graph_map[