CSBDeep / CSBDeep_fiji

BSD 2-Clause "Simplified" License
11 stars 4 forks source link

mpicbg.csbd.commands.GenericNetwork#modelInitialized #14

Closed sommerc closed 5 years ago

sommerc commented 6 years ago

I installed the current Fiji CSBDeep plugin from your update site. When select "Generic Network", I get the error:

Couldn't load tensorflow from library path. Using CPU version from jar file.
DatasetTensorBridge initialized
--------------
axisDataset:{Y=1, Channel=-1, Z=-1, Time=-1, X=0}
axisSize:{Y=512, Channel=1, Z=1, Time=1, X=512}
axisTF:{Y=-1, Channel=-1, Z=-1, Time=-1, X=-1}
--------------
[ERROR] null
org.scijava.module.MethodCallException: Error executing method: mpicbg.csbd.commands.GenericNetwork#modelInitialized
    at org.scijava.module.MethodRef.execute(MethodRef.java:74)
    at org.scijava.module.AbstractModuleItem.initialize(AbstractModuleItem.java:202)
    at org.scijava.module.AbstractModule.initialize(AbstractModule.java:95)
    at org.scijava.module.process.InitPreprocessor.process(InitPreprocessor.java:62)
    at org.scijava.module.ModuleRunner.preProcess(ModuleRunner.java:105)
    at org.scijava.module.ModuleRunner.run(ModuleRunner.java:157)
    at org.scijava.module.ModuleRunner.call(ModuleRunner.java:127)
    at org.scijava.module.ModuleRunner.call(ModuleRunner.java:66)
    at org.scijava.thread.DefaultThreadService$3.call(DefaultThreadService.java:238)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at org.scijava.module.MethodRef.execute(MethodRef.java:70)
    ... 12 more
Caused by: java.lang.IllegalArgumentException: NodeDef mentions attr 'dilations' not in Op<name=Conv2D; signature=input:T, filter:T -> output:T; attr=T:type,allowed=[DT_HALF, DT_FLOAT]; attr=strides:list(int); attr=use_cudnn_on_gpu:bool,default=true; attr=padding:string,allowed=["SAME", "VALID"]; attr=data_format:string,default="NHWC",allowed=["NHWC", "NCHW"]>; NodeDef: down_level_0_no_0_1/convolution = Conv2D[T=DT_FLOAT, _output_shapes=[[?,?,?,32]], data_format="NHWC", dilations=[1, 1, 1, 1], padding="SAME", strides=[1, 1, 1, 1], use_cudnn_on_gpu=true](input_2, down_level_0_no_0_1/kernel/read). (Check whether your GraphDef-interpreting binary is up to date with your GraphDef-generating binary.).
    at org.tensorflow.SavedModelBundle.load(Native Method)
    at org.tensorflow.SavedModelBundle.load(SavedModelBundle.java:38)
    at net.imagej.tensorflow.DefaultTensorFlowService.loadModel(DefaultTensorFlowService.java:113)
    at mpicbg.csbd.commands.GenericNetwork.loadModel(GenericNetwork.java:194)
    at mpicbg.csbd.commands.GenericNetwork.modelChanged(GenericNetwork.java:236)
    at mpicbg.csbd.commands.GenericNetwork.modelInitialized(GenericNetwork.java:219)
    ... 17 more
HedgehogCode commented 6 years ago

Sorry for the late response. It seems like you are using a newer version of TensorFlow to create the model in python than used by the Fiji Plugin.

Currently, we use TensorFlow 1.3.0 (which is kind of old and we try to update it soon but it takes some testing because the TensorFlow Java API is not guaranteed to be stable)

If you have the option you could downgrade TensorFlow in your python environment.

sommerc commented 6 years ago

Indeed, I use tensorflow 1.7. Thanks for the clarification!