Model Zoo
Prebuilt model architectures and weights for out-of-the-box application.
Deeplearning4j has native model zoo that can be accessed and instantiated directly from DL4J. The model zoo also includes pretrained weights for different datasets that are downloaded automatically and checked for integrity using a checksum mechanism.
If you want to use the new model zoo, you will need to add it as a dependency. A Maven POM would add the following:
<dependency>
<groupId>org.deeplearning4j</groupId>
<artifactId>deeplearning4j-zoo</artifactId>
<version>1.0.0-M1.1</version>
</dependency>
Once you've successfully added the zoo dependency to your project, you can start to import and use models. Each model extends the
ZooModel
abstract class and uses the InstantiableModel
interface. These classes provide methods that help you initialize either an empty, fresh network or a pretrained network.You can instantly instantiate a model from the zoo using the
.init()
method. For example, if you want to instantiate a fresh, untrained network of AlexNet you can use the following code:import org.deeplearning4j.zoo.model.AlexNet
import org.deeplearning4j.zoo.*;
...