updating image, nn, cutorch, optim, torch