How to provide image and number as input to model

I want to create a model which takes two inputs

  1. digit image from MNIST dataset
  2. random number from 0-9

Output
Sum of two numbers

image

How to create this model using pytorch