-
-
Save amankharwal/2d0a27104834e06d74e83aa9c1425487 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Prediction Algorithm | |
def predict_single(input, target, model): | |
inputs = input.unsqueeze(0) | |
predictions = model(inputs) # fill this | |
prediction = predictions[0].detach() | |
print("Input:", input) | |
print("Target:", target) | |
print("Prediction:", prediction) | |
# Testing the model with some samples | |
input, target = val_ds[0] | |
predict_single(input, target, model) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment