Package deepnetts.util
Class FileIO
java.lang.Object
deepnetts.util.FileIO
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic ConvolutionalNetworkcreateConvolutionalNetworkFromJson(org.json.JSONObject jsonObj) static FeedForwardNetworkcreateFeedForwardNetworkFromJson(org.json.JSONObject jsonObj) static NeuralNetworkcreateFromFile(File file) static <T> TcreateFromFile(File file, Class<T> clazz) static <T> TcreateFromFile(String fileName, Class<T> clazz) static NeuralNetworkcreateFromJson(File file) static NeuralNetworkcreateFromJson(String jsonStr) static NeuralNetworkcreateFromJson(org.json.JSONObject jsonObj) static StringtoJson(NeuralNetwork<?> nnet) Returns JSON representation of specified neural network object.static voidwriteToFile(NeuralNetwork neuralNet, String fileName) Serializes specified neural network to file with specified file.static voidwriteToFileAsJson(NeuralNetwork neuralNet, String fileName)
-
Field Details
-
NETWORK_FILE_EXT
- See Also:
-
-
Method Details
-
writeToFile
Serializes specified neural network to file with specified file.- Parameters:
neuralNet- neural network to savefileName- name of the file- Throws:
IOException- if something goes wrong
-
writeToFileAsJson
- Throws:
IOException
-
createFromFile
public static <T> T createFromFile(String fileName, Class<T> clazz) throws IOException, ClassNotFoundException - Throws:
IOExceptionClassNotFoundException
-
createFromFile
public static <T> T createFromFile(File file, Class<T> clazz) throws IOException, ClassNotFoundException - Throws:
IOExceptionClassNotFoundException
-
createFromFile
- Throws:
IOExceptionClassNotFoundException
-
toJson
Returns JSON representation of specified neural network object.- Parameters:
nnet-- Returns:
-
createFromJson
-
createFromJson
- Throws:
FileNotFoundExceptionIOException
-
createFromJson
-
createConvolutionalNetworkFromJson
-
createFeedForwardNetworkFromJson
-