Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def createInputVec(z,x,y):
- r = math.sqrt(((x*scale-(img_size*scale/2))**2) + ((y*scale-(img_size*scale/2))**2) )
- z_size = len(z)
- input = torch.rand(1,z_size + 3)
- for i in range(z_size):
- input[0][i] = z[i] * scale
- input[0][z_size] = x * scale
- input[0][z_size+1] = y * scale
- input[0][z_size+2] = r
- input = Variable(input)
- return input
Add Comment
Please, Sign In to add comment