{ "info": { "author": "Zhuofu Pan", "author_email": "475366898@qq.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# deepfree\nKeras-style deep network package for classification and prediction.\n# install\n``` python \npip install --upgrade numpy h5py\npip install --upgrade deepfree\n```\n# feature\n## fast learning\nThe main framework of the program relies on `Model` in `core._model` and `Layer` in `core._layer`, which can import directly through `'from deepfree import Model, Layer'`. You can quickly build and train the model by using them flexibly. In addition, the constructed `DBN` and `SAE` can be employed directly, which are inherited from `Model`.\n## stacking blocks\nBy calling `Model.add_layer(['a Layer of a list of Layer'])`, you can build the model like stack the blocks. There are a set of `Layer` can be selected, such as `phvariable`, `maxpooling2d`,`flatten`,`concatenate`, `Dense`, `Conv2D`.\n## flexible setting\nYou can set the model's parameters listed in `base._attribute` when first building model (`DBN(para=...)`, `SAE(para=...)`, `Model(para=...)`) or training it (`Model.training(para=...)`). If you do not set a value, the default value in `base._attribute` will be applied.\n## results display\n`'loss & test accuracy - epoch'` curve and `'prediction - epoch'` curve will be generated automatically. Furthermore, `real label -> predicted label` count result and `t-SNE visualization` image can be obtained by calling `Model.plot_label_cnt` and `Model.plot_tSNE`, respectively.\n# example\nA simple DNN can be constructed and trained as:\n```python\nfrom deepfree import Model\nfrom deepfree import phvariable,Dense\nmodel = Model()\nmodel.struct = [784, 100 ,10]\nmodel.input = phvariable(model.struct[0])('input')\nmodel.label = phvariable(model.struct[-1])('label')\n\nfor i in range(len(model.struct)-2):\n model.add_layer(Dense(model.struct[i+1], \n activation = model.next_hidden_activation(), \n is_dropout = True))\nmodel.add_layer(Dense(model.struct[-1], activation = model.output_func))\nmodel.training(dataset = ...,data_path = ...)\n```\n# plot\nThe running result can be find in `'result'` folder.\n\n- **loss & test accuracy - epoch curve:** \n



