Skip to content

Commit

Permalink
Got resnet working - doing some more investigation to find bugs.
Browse files Browse the repository at this point in the history
  • Loading branch information
drewoldag committed Jan 22, 2025
1 parent 1bdb096 commit 4cf5391
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/kbmod_ml/data_sets/kbmod_stamps.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def __init__(self, config, split: str):

cols = []

for c in ["mean", "median"]:
for c in ["mean"]:
cols.append(coadd_type_to_column[c])

self.active_columns = np.array(cols)
Expand Down
4 changes: 2 additions & 2 deletions src/kbmod_ml/default_config.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[data_set]
name = "kbmod_ml.data_sets.kbmod_stamps.KbmodStamps"

train_split = 0.8
train_size = 0.8

validation_split = 0.2
validate_size = 0.2

[kbmod_ml]
# The file name of the true positive samples
Expand Down
14 changes: 13 additions & 1 deletion train_model.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,21 @@
"metadata": {},
"outputs": [],
"source": [
"from fibad import Fibad\n",
"\n",
"fibad_instance = Fibad(config_file=\"./user_config.toml\")\n",
"\n",
"# Change the model to the resnet50 model and attempt to train\n",
"fibad_instance.config[\"model\"][\"name\"] = \"kbmod_ml.models.resnet50.RESNET50\"\n",
"fibad_instance.config[\"data_loader\"][\"batch_size\"] = 1\n",
"fibad_instance.config[\"train\"][\"epochs\"] = 2"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"fibad_instance.train()"
]
},
Expand Down

0 comments on commit 4cf5391

Please sign in to comment.