def reconstruct_spec(mlp, spec, outfile):

    fin = open(mlp)
    print 'load mlp..'
    mlp = cPickle.load(fin)
    fin.close()

    warp_spec = open(spec)
    warp_spec = np.fromfile(warp_spec, dtype='<f4')
    assert 2049 % warp_spec.shape[0] == 0
    warp_spec = warp_spec.reshape((warp_spec.shape[0]/2049, 2049))

    gcn = GCN()
    out = gcn.apply(warp_spec)

    out = out * mlp.fprop(out)

    output_file = open(outfile, 'wb')
    out.tofile(output_file, format='<f4')
dataset/ETHPy150Open hycis/Pynet/scripts/tmp.py/reconstruct_spec/swapped operands of `%`