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
In the absence of ReshapePorts in Lava, we have implemented reshaping with dedicated Reshape Processes (ReshapeBool, ReshapeInt) and changed the implementation of the connect() function to insert these Processes:
Population (Source) -> ReshapeBool -> Dense -> ReshapeInt -> Population (Destination)
Once ReshapePorts are available, use them and remove the Reshape Processes.
In connect.py, replace
# make connections from the source port to the connections process# TODO (MR) workaround in absence of ReshapePortscon_ip=connections.s_inrs1=ReshapeBool(shape_in=src_op.shape, shape_out=con_ip.shape)
src_op.connect(rs1.s_in)
rs1.s_out.connect(con_ip)
# make connections from the connections process to the destination port# TODO (MR) workaround in absence of ReshapePortscon_op=connections.a_outrs2=ReshapeInt(shape_in=con_op.shape, shape_out=dst_ip.shape)
con_op.connect(rs2.s_in)
rs2.s_out.connect(dst_ip)
by
# make connections from the source port to the connections processsrc_op_flat=src_op.reshape(connections.in_ports.s_in.shape)
src_op_flat.connect(connections.in_ports.s_in)
# make connections from the connections process to the destination portcon_op=connections.out_ports.a_out.reshape(dst_ip.shape)
con_op.connect(dst_ip)
In test_connect.py, replace
# check whether 'source' is connected to 'connections'src_op=source.out_ports.s_outcon_ip=connections.in_ports.s_in# TODO (MR): remove this after switching to Reshape portsrs1_op=src_op.get_dst_ports()[0].process.out_ports.s_outself.assertEqual(rs1_op.get_dst_ports(), [con_ip])
self.assertEqual(con_ip.get_src_ports(), [rs1_op])
# check whether 'connections' is connected to 'target'con_op=connections.out_ports.a_outdst_op=destination.in_ports.a_in# TODO (MR): remove this after switching to Reshape portsrs2_op=con_op.get_dst_ports()[0].process.out_ports.s_outself.assertEqual(rs2_op.get_dst_ports(), [dst_op])
self.assertEqual(dst_op.get_src_ports(), [rs2_op])
by
# check whether 'source' is connected to 'connections'src_op=source.out_ports.s_outcon_ip=connections.in_ports.s_inself.assertEqual(src_op.get_dst_ports(), [con_ip])
self.assertEqual(con_ip.get_src_ports(), [src_op])
# check whether 'connections' is connected to 'target'con_op=connections.out_ports.a_outdst_op=destination.in_ports.a_inself.assertEqual(con_op.get_dst_ports(), [dst_op])
self.assertEqual(dst_op.get_src_ports(), [con_op])
Remove directories lava/lib/dnf/connect/reshape_* including all content.
The text was updated successfully, but these errors were encountered:
In the absence of ReshapePorts in Lava, we have implemented reshaping with dedicated Reshape Processes (ReshapeBool, ReshapeInt) and changed the implementation of the connect() function to insert these Processes:
Population (Source) -> ReshapeBool -> Dense -> ReshapeInt -> Population (Destination)
Once ReshapePorts are available, use them and remove the Reshape Processes.
by
by
The text was updated successfully, but these errors were encountered: