File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed
Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change 4242 "metadata" : {},
4343 "outputs" : [],
4444 "source" : [
45+ " import java.nio.file.*;\n " ,
4546 " import java.awt.image.*;\n " ,
4647 " import ai.djl.*;\n " ,
4748 " import ai.djl.inference.*;\n " ,
151152 "metadata" : {},
152153 "outputs" : [],
153154 "source" : [
154- " // Search for models in the build/pytorch_models folder\n " ,
155- " System.setProperty(\" ai.djl.repository.zoo.location\" , \" build/pytorch_models/resnet18\" );\n " ,
156- " \n " ,
157155 " Criteria<Image, Classifications> criteria = Criteria.builder()\n " ,
158156 " .setTypes(Image.class, Classifications.class)\n " ,
159- " // only search the model in local directory\n " ,
160- " // \" ai.djl.localmodelzoo:{name of the model}\"\n " ,
161- " .optArtifactId(\" ai.djl.localmodelzoo:resnet18\" )\n " ,
157+ " .optModelPath(Paths.get(\" build/pytorch_models/resnet18\" ))\n " ,
162158 " .optTranslator(translator)\n " ,
163159 " .optProgress(new ProgressBar()).build();\n " ,
164160 " \n " ,
230226 "mimetype" : " text/x-java-source" ,
231227 "name" : " Java" ,
232228 "pygments_lexer" : " java" ,
233- "version" : " 12 .0.2+10 "
229+ "version" : " 11 .0.11+9-LTS "
234230 },
235231 "pycharm" : {
236232 "stem_cell" : {
You can’t perform that action at this time.
0 commit comments