Configure DeepLearning4J to work with MKL (instead of OpenBlas) - deeplearning4j

I'm using word2vec with DL4J (DeepLearning4J).
When running the application, I see that the application always loads [OPENBLAS]. I can see this log entry:
INFO [main] DefaultOpExecutioner - Blas vendor: [OPENBLAS]
How can I configure it to load [MKL] instead?
I have MKL installed and running on Windows.

As Samuel said, need to define a system variable in order to load MKL.
Specifically, this worked for me:
-Dorg.bytedeco.openblas.load=mklml
-Dorg.bytedeco.openblas.load=mkl_rt
More info in: https://github.com/bytedeco/javacpp-presets/tree/master/openblas#documentation

Related

Tensorflow Serving - Not found: Op type not registered 'GatherTree'

I just a newbie. I have problem when I serving tensorflow model in this case:
I. Using this http://opennmt.net/OpenNMT-tf/quickstart.html to train the model.
II. Serving the model with following steps:
Create docker image with:
docker build --pull -t $USER/tensorflow-serving-devel -f tensorflow_serving/tools/docker/Dockerfile.devel .
Run docker container:
docker run --name=tf_container -it $USER/tensorflow-serving-devel
Serving the model:
tensorflow_model_server --port=9000 --model_name=model_name --model_base_path=/model_file &> result_log &
III.The result_log file content:
2019-10-21 02:46:12.840258: I tensorflow_serving/core/loader_harness.cc:155] Encountered an error for servable version {name: ente version: 1569320347}: Not found: Op type not registered 'GatherTree' in binary running on 1b79e5fb3ac4. Make sure the Op and Kernel are registered in the binary running in this process. Note that if you are loading a saved graph which used ops from tf.contrib, accessing (e.g.) `tf.contrib.resampler` should be done before importing the graph, as contrib ops are lazily registered when the module is first accessed.
2019-10-21 02:46:12.840280: E tensorflow_serving/core/aspired_versions_manager.cc:359] Servable {name: ente version: 1569320347} cannot be loaded: Not found: Op type not registered 'GatherTree' in binary running on 1b79e5fb3ac4. Make sure the Op and Kernel are registered in the binary running in this process. Note that if you are loading a saved graph which used ops from tf.contrib, accessing (e.g.) `tf.contrib.resampler` should be done before importing the graph, as contrib ops are lazily registered when the module is first accessed.
2019-10-21 02:46:13.664569: I tensorflow_serving/core/basic_manager.cc:280] Unload all remaining servables in the manager.
Failed to start server. Error: Unknown: 1 servable(s) did not become available: {{{name: ente version: 1569320347} due to error: Not found: Op type not registered 'GatherTree' in binary running on 1b79e5fb3ac4. Make sure the Op and Kernel are registered in the binary running in this process. Note that if you are loading a saved graph which used ops from tf.contrib, accessing (e.g.) `tf.contrib.resampler` should be done before importing the graph, as contrib ops are lazily registered when the module is first accessed.}, } ```
I have searched Google and try to update some services, but the problem still here. Anyone have any idea please?
Thanks so much for any suggestions!
With the transition to TensorFlow 2.0, the GatherTree op that is used in beam search is currently not available in TensorFlow Serving.
If you exported your model with OpenNMT-tf 1.x, it uses the op GatherTree from tf.contrib which was removed in recent versions of TensorFlow Serving. You should use a previous version of TensorFlow Serving such as 1.15.0.
If you exported your model with OpenNMT-tf 2.x, it uses the op Addons>GatherTree from TensorFlow Addons which is presently not integrated in TensorFlow Serving. This is a work in progress. There are currently 2 workarounds:
use opennmt/tensorflow-serving:2.1.0 which is a custom Serving build that includes this op.
disable beam search in OpenNMT-tf by exporting your model with this configuration:
params:
beam_width: 1

After Upgrading from Alfresco 4.2 to 5.2, Transformation is not working for .TIF Image files

I have migrated one Application from Alfresco 4.2 version to Alfresco 5.2 version.
But after up-gradation Image preview is not displaying for any file and Transformation is not working.
Console Logs:-----
2018-02-02 08:58:46,022 INFO [repo.jscript.ScriptNode] [http-apr-8080-exec-25] Unable to create thumbnail 'doclib' for image/tiff as no transformer is currently available.
2018-02-02 08:59:10,076 WARN [jcms.transform.TesseractOCRTransformer] [http-apr-8080-exec-45] Command options did not appear to contain ImageMagick setting for monochrome, cannot invoke Tesseract.
Can anyone please help with this, or any work around to solve this issue.
your valuable reply will be really appreciated.
For more details about issue, please find attached screen-shot.
In the Alfresco Community 5.2 on Windows the ImageMagick install is borked. I found a workaround:
Install ImageMagick from the developer site
https://www.imagemagick.org/script/download.php
Edit the alfresco-global.properties found in C:\alfresco-community\tomcat\shared\classes
Change the img.root value to point to your fresh installation, like this:
img.root=C:\\PROGRA~1\\ImageMagick-7.0.7-Q16
Restart the alfresco server
NOTE: You will see this in the logs before:
err: convert.exe: RegistryKeyLookupFailed `CoderModulesPath' # error/module.c/GetMagickModulePath/670.
convert.exe: no decode delegate for this image format `GIF' # error/constitute.c/ReadImage/509.
Afterwards that error will not be present in the logs.
There's a setenv.bat file that sets up some Imagemagick related environment variables. I suspect they're missing from the build that you have, either by yours or Alfresco's mistake.
After you installed Imagemagick separately, that installation simply took care of these variables.
They go something like this:
MAGICK_HOME="/srv/alfresco-3.4.a/common"
MAGICK_CONFIGURE_PATH="/srv/alfresco-3.4.a/common/lib/ImageMagick-6.5.1/config:/srv/alfresco-3.4.a/common/share/ImageMagick-6.5.1/config"
MAGICK_CODER_MODULE_PATH="/srv/alfresco-3.4.a/common/lib/ImageMagick-6.5.1/modules-Q16/coders"

Spark ARIMA Model Example Error

I am trying to run the provided ARIMA model example (Spark spark-ts library) with the ARIMA test data using Java API based on 0.4.0 jar. I am using "ARIMA.autoFit(ts, 1, 1, 1);" for fitting the model.
However, I get two warnings as below, after which execution halts without any further progress or errors:
WARN BLAS: Failed to load implementation from: com.github.fommil.netlib.NativeSystemBLAS
WARN BLAS: Failed to load implementation from: com.github.fommil.netlib.NativeRefBLAS
Tried Google & installed "libgfortran3", but to no avail.
Any suggestions?
Thanks
I fixed the issue by building the jar from scratch via Maven rather than using the pre-built jar. Also, I built it on the Ubuntu machine where Spark runs.

Unable to install gremlin-neo4j through gremlin shell

So, I'm going through the tutorial on getting started with the TinkerPop 3.0 stuff. I've gotten the basic API working with the TinkerGraph stuff, and I'm moving on to try and interface with my local Neo4j instance (Community 2.2.2). I'm working through the tutorial here:
http://tinkerpop.incubator.apache.org/docs/3.0.0.M9-incubating/
but, the neo4j-gremlin plugin does not appear to exist as documented. Neither the gradle line:
compile group : 'org.apache.tinkerpop', name: 'neo4j-gremlin', version: '3.0.0.M9-incubating'
, nor the following attempt through the gremlin groovy shell:
gremlin> :plugin list
==>tinkerpop.server[active]
==>tinkerpop.gephi
==>tinkerpop.utilities[active]
==>tinkerpop.sugar
==>tinkerpop.tinkergraph[active]
gremlin> :install org.apache.tinkerpop neo4j-gremlin 3.0.0.M9-incubating
Error grabbing Grapes -- [unresolved dependency: org.apache.tinkerpop#neo4j-gremlin;3.0.0.M9-incubating: not found]
Display stack trace? [yN] y
java.lang.RuntimeException: Error grabbing Grapes -- [unresolved dependency: org.apache.tinkerpop#neo4j-gremlin;3.0.0.M9-incubating: not found]
seem to work, because neither one can resolve the dependency. The problem persists if the M9 is replaced back to at least M7, or if I try and grab from 3.0.0-SNAPSHOT. Has TinkerPop just dropped support for Neo4j and has not updated their tutorials?
I guess there's some discrepancy between documentation and where Neo4j stands in terms of official release. Neo4j was removed from the repository around M7 at the time TinkerPop started making releases under the Apache Software Foundation (given license conflicts). It was added back to the repository after the M9 release as license issues were resolved. As it stands now, there is approval from Apache on the packaging of Neo4j thus allowing it to be officially included as part of the next release which should be GA.
Note that Neo4j has not changed its licensing structure for this to happen. It remains GPL-based. The GPL'd dependencies however are NOT packaged with TinkerPop binary distributions and the source distributions are free of GPL dependencies as well. It's an interesting model actually and took a fair bit of collaboration with all parties to accomplish.
It is actually pretty easy to work around this issue, but it involves you building TinkerPop from source. The following commands should do it:
git clone https://github.com/apache/incubator-tinkerpop.git
cd incubator-tinkerpop
git checkout tags/3.0.0-incubating-rc1
mvn clean install -DskipTests -DincludeNeo4j
Note that 3.0.0-incubating-rc1 is the current release candidate for GA that vendors are testing their implementations against right now. I assume that you've configured your grapeConfig.xml file as described in the TinkerPop 3 documentation, which would mean that it is configured to look at your local Maven .m2 directory. If so, that should get your :install command to work as well as other dependency management tools.

How to do digital image processing using opencv on Eclipse

I am new to Digital Image Processing and want to do it using OpenCV on Eclipse. I just want to know how can i start doing it and how i can configure opencv and eclipse using CMAKE . Please suggest me some good tutorial.Also please help me with adding opencv include files and library in Eclipse.
I am using Eclipse Juno.
on Windows 7.
Thanks.
Your best bet is to begin with the OpenCV documentation. Their Getting Started tutorial should be your first stop. They have another strategy with a custom FindOpenCV.cmake file as documented here but I would suggest sticking with the strategy outlined in Getting Started.
In terms of eclipse, cmake generates IDE related metadata for you and Kitware does provide an eclipse CDT generator, documented here. Two important things to keep in mind. First cmake actually generates the eclipse metadata which you then import as an existing project. Second, the example they give is intended to work with Unix makefiles:
cmake -G"Eclipse CDT4 - Unix Makefiles" -D CMAKE_BUILD_TYPE=Debug ../certi_src
If you are using windows you'll want to choose an appropriate generator instead of "Unix Makefiles"

Resources