In Deep learning use cases images are represented as 3-D tensors (for colored images) and 2-D tensors (for gray scale images). Images mainly have three attributes: height, width, channels . Different deep learning frameworks expect these attributes to be specified in different order as per respective frameworks. In this post we are going to discuss the formats in which popular deep learning frameworks expect these attributes to be specified. Currently there are many deep learning frameworks in the market like: 1. Keras (for Python): Keras is a deep learning framework for Python. Keras is a wrapper around numerical computing libraries to provide user an easy interface to code Deep Learning networks. As a backend Keras could use: a. Tensorflow b. Theano 2. DL4J (for Java/Scala): DL4J is a deep learning framework written in Java. It could be used with Java as well scala programming languages.
R is powerful language for statistical analysis and Machine Learning. Java is best suited to develop enterprise applications. Integrating both could lead to developing powerful analytic applications. In this tutorial we are going to call a R script from java, then pass the parameters from java to R and fetch back the results from R to Java. Problem Statement: In this tutorial we have a csv file 'data.csv' having 4 columns and we need to calculate mean of few user defined columns. To calculate the mean we will be using and then we will pass the calculated mean back to Java. Pre-requisites: 1. You should know how to integrate R with Java. For that you could consult the tutorial http://rajeev0401.blogspot.in/2013/10/using-r-programming-language-inside-java.html Code Files: We will be needing following files: 1. data.csv: file having data that will be used in R script. 2. config.R: this file contains the configuration (vector having column index) to be used in 'test