Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Experiments/kyle models #3

Merged
merged 6 commits into from
Apr 9, 2024
Merged

Experiments/kyle models #3

merged 6 commits into from
Apr 9, 2024

Conversation

kyle-woodward
Copy link
Member

New:

  • added mobilenet_v3small and vgg16 model fns to models.py
  • model_fit.py is now a CLI that takes -c --config file (.yml)

Notes:
I figured if we name our runc.yml files uniquely with our intials then its fine to push them and we won't overwrite each others, and we can test each other's out.

Upon running model_fit.py wiht vgg16 as the model, I get an error in the confusion_matrix callback from sk-learn. it does not raise at first iteration of training though. Could be a parameteraization of sklearn.metrics.confusion_matrix to ignore inconsistent per-label sample sizes??

Epoch 1/100
4/4 [==============================] - 1s 106ms/stepe_coef: 0.6609 - binary_accuracy: 0.6362
Traceback (most recent call last):
  File "C:\fao-models\fao_models\model_fit.py", line 139, in <module>
    main()
  File "C:\fao-models\fao_models\model_fit.py", line 127, in main
    history = model.fit(
  File "C:\Users\kyle\anaconda3\envs\sigma\lib\site-packages\keras\utils\traceback_utils.py", line 70, in error_handler
    raise e.with_traceback(filtered_tb) from None
  File "C:\fao-models\fao_models\models.py", line 71, in on_epoch_end
    self.log_confusion_matrix(epoch=epoch)
  File "C:\fao-models\fao_models\models.py", line 79, in log_confusion_matrix
    cm = confusion_matrix(self.test_labels, test_pred)
  File "C:\Users\kyle\anaconda3\envs\sigma\lib\site-packages\sklearn\utils\_param_validation.py", line 211, in wrapper
    return func(*args, **kwargs)
  File "C:\Users\kyle\anaconda3\envs\sigma\lib\site-packages\sklearn\metrics\_classification.py", line 326, in confusion_matrix
    y_type, y_true, y_pred = _check_targets(y_true, y_pred)
  File "C:\Users\kyle\anaconda3\envs\sigma\lib\site-packages\sklearn\metrics\_classification.py", line 84, in _check_targets
    check_consistent_length(y_true, y_pred)
  File "C:\Users\kyle\anaconda3\envs\sigma\lib\site-packages\sklearn\utils\validation.py", line 409, in check_consistent_length
    raise ValueError(
ValueError: Found input variables with inconsistent numbers of samples: [97, 128]

@jdilger
Copy link
Member

jdilger commented Apr 9, 2024

LGTM 😄

@jdilger jdilger merged commit 219f5e2 into main Apr 9, 2024
3 of 8 checks passed
@kyle-woodward kyle-woodward deleted the experiments/kyle-models branch April 11, 2024 20:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants