1. A semiconductor device comprising: stacked semiconductor elements; a resin film formed between the stacked semiconductor elements; and at least one of a light emitting element and a light receiving element electrically connected to each of the stacked semiconductor elements, wherein a signal is transmitted and received between the stacked semiconductor elements by using the light emitting element and the light receiving element.