The ability to learn from experience constitutes an important property for cognitive robots because it allows them to adapt to the environment and extend their capabilities beyond what can be programmed by hand. In this talk I will provide an overview of recent studies aimed to endow the iCub robot with the ability to learn visual representations of objects and tools. In the first part of the talk I will illustrate a framework that allows a robot to autonomously discover pulling affordances and build a visual representation of the tools that is suitable for generalization. Motivated by the recent results in Computer Vision we have investigated the use of Deep Convolutional Neural Networks for object recognition. In the second part of the talk I will illustrate our on-going effort to benchmark such system in a robotic application and the experimental results we have obtained. I will discuss how the robotic setting differs from the typical image retrival scenario and the specific challenges that remain to be solved to reach reliable performance in a practical task.