Python implementation of Back Propagation Algorithm without bias
First, I wouldn't rely on flatten from a module like setuptools. Its purpose isn't in line with the interface of the module, so it's likely an &quot;implementation detail&quot;. There isn't necessarily any guarantee that it will exist in the future.
Also, if you check its definition, you'll be pointed to a better option:
flatten = itertools.chain.from_iterable

It's simply a alias for from_iterable on itertools.chain.

Please respect Python's naming conventions. Normal variable names should be in snake_case.

I would try and split this up into functions. Even if done simply, a procedure of
def main():
    initialize_net()
    propagate()
    backpropagate_errors()

makes it a lot easier to immediately understand the flow of the program and what code is a part of what step. That would also make it easier to control when the code in the script runs. You don't necessarily want the whole thing to run just because you loaded the file into your IDE.

Sorry, I wish I had the energy to do a good review of this. I remember my first NN from scratch. That was a fun project.