Skip to content

Commit

Permalink
iniial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
marcobellagente93 authored and marcobellagente93 committed Aug 12, 2021
1 parent b84660d commit c723b4d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Binary file added data/TopTagging/val.h5
Binary file not shown.
6 changes: 3 additions & 3 deletions load_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,19 @@ def read_files(DATAPATH, dataset, verbose=True):
if dataset in file:
if verbose:
print("Reading data from {}".format(file))
events = pd.read_hdf(os.path.join(DATAPATH, file), key='table').values
events = pd.read_hdf(os.path.join(DATAPATH, file), key='data').values

return events

def Loader(dataset, batch_size, test):

datapath = './data/top_tagging'
datapath = './data/TopTagging'
data = read_files(datapath, dataset)

if test == True:
split = int(len(data) * 0.01)
else:
split = int(len(data) * 0.01)
split = int(len(data) * 1.0)

events=data
events_train = events[:split]
Expand Down
4 changes: 2 additions & 2 deletions train.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
print(model)
print('Total parameters: %d' % sum([np.prod(p.size()) for p in model.params_trainable]))

train_loader, train_size, data_shape = Loader('train_img40_add', c.batch_size, False)
val_loader, val_size, data_shape = Loader('test_img40_add', c.batch_size, False)
train_loader, train_size, data_shape = Loader('train', c.batch_size, False)
val_loader, val_size, data_shape = Loader('val', c.batch_size, False)

N_epochs = c.n_epochs
t_start = time()
Expand Down

0 comments on commit c723b4d

Please sign in to comment.