def worker(i): td = TDOld() tdnew = TrainData() print("converting",dcold.samples[i]) td.readIn(dir + dcold.samples[i]) x = td.x y = td.y w = td.w tdnew.tdnew._store(x,y,w) tdnew.writeToFile(dcnew.samples[i]) td.clear() tdnew.clear() del x,y,w return True
td.skim(int(args.e)) #td=td.split(int(args.e)+1)#get the first e+1 elements #if int(args.e)>0: # td.split(1) #reduce to the last element (the e'th one) model = load_model(args.inputModel, custom_objects=get_custom_objects()) predicted = predict_from_TrainData(model, td, batchsize=100000) pred = predicted[0] feat = td.transferFeatureListToNumpy() rs = feat[1] feat = feat[0] #weights = td.transferWeightListToNumpy() truth = td.transferTruthListToNumpy()[0] td.clear() print(feat.shape) print(truth.shape) fig = plt.figure(figsize=(10, 4)) ax = [fig.add_subplot(1, 2, 1, projection='3d'), fig.add_subplot(1, 2, 2)] data = create_index_dict(truth, pred, usetf=False) feats = create_feature_dict(feat) make_cluster_coordinates_plot( plt, ax[1], data['truthHitAssignementIdx'], #[ V ] data['predBeta'], #[ V ]