Skip to content

Instantly share code, notes, and snippets.

@Adityanagraj
Created July 2, 2020 09:01
Show Gist options
  • Save Adityanagraj/6296c0f00d2e133f2a58deadb1628bff to your computer and use it in GitHub Desktop.
Save Adityanagraj/6296c0f00d2e133f2a58deadb1628bff to your computer and use it in GitHub Desktop.
def predict_single(input, target, model):
inputs = input.unsqueeze(0)
predictions = model(inputs) # fill this #model(inputs)
prediction = predictions[0].detach()
print("Input:", input)
print("Target:", target)
print("Prediction:", prediction)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment