From the viewpoint of computational theory, we discuss the visuomotor transformation in human grasping movements. Determining a hand shape to grasp an object is an ill-posed problem, because there are many ways to grasp the object. We propose two kinds of neural network architectures for calculating the optimal hand shape. Network operation is divided into a learning phase and an optimization phase. In the learning phase, an internal model that represents the relation between objects and hand shapes is acquired. In the optimization phase, the most suitable hand shapes for grasping objects are designed by using a relaxation computation of the network. In the first model, the internal representations of objects are specified with symbolic or population coding. In the second model, no representation of objects is defined beforehand; instead, the neural network acquires the internal representations of objects by integrating visual and motor information.