Skip to content

Commit

Permalink
update train_csn.py
Browse files Browse the repository at this point in the history
  • Loading branch information
dummyindex committed Mar 19, 2024
1 parent 297d4be commit b530ab9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions livecellx/model_zoo/segmentation/train_csn.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,9 @@ def df2dataset(df):
if args.debug:
train_df = train_df[:100]
val_df = val_df[:10]
# Get rid of last batch if it's not full to prevent BatchNorm complaints
train_df = train_df.iloc[: (len(train_df) // args.batch_size) * args.batch_size]
val_df = val_df.iloc[: (len(val_df) // args.batch_size) * args.batch_size]

train_dataset = df2dataset(train_df)
val_dataset = df2dataset(val_df)
Expand Down

0 comments on commit b530ab9

Please sign in to comment.