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

Core structure updates: image and text featurizer #172

Draft
wants to merge 17 commits into
base: master
Choose a base branch
from
Draft
Prev Previous commit
wrap up the pr: bug fix
  • Loading branch information
zzachw committed Jul 16, 2023
commit ec3c1aa4b709cc166ca1ad074ef08cfb3ec78693
2 changes: 1 addition & 1 deletion pyhealth/models/torchvision_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def __init__(
hidden_dim = final_layer.in_features
self.label_tokenizer = self.get_label_tokenizer()
output_size = self.get_output_size(self.label_tokenizer)
setattr(self.model, final_layer_name, nn.Linear(hidden_dim, output_size))
setattr(self.model, final_layer_name.split(".")[0], nn.Linear(hidden_dim, output_size))

def forward(self, **kwargs) -> Dict[str, torch.Tensor]:
"""Forward propagation."""
Expand Down