p2irc / deepplantphenomics

Deep learning for plant phenotyping.
GNU General Public License v2.0
133 stars 46 forks source link

typo? #25

Closed 3nryk closed 5 years ago

3nryk commented 5 years ago

Hi!

I think there's a typo in set_loss_function() for regression.

elif self.__problem_type == definitions.ProblemType.REGRESSION and loss_fn not in self.__supported_loss_fns_cls

Thanks!

donovanlavoie commented 5 years ago

That is indeed a typo in that function. I also seem be having trouble running set_loss_function at all, since giving it acceptable inputs makes it throw a warning and exit instead of actually setting the loss function. For example:

>>> import deepplantphenomics as dpp
# numpy whining...
>>> model = dpp.DPPModel(debug=True, save_checkpoints=False)
11:29AM: TensorFlow loaded...
WARNING: Logging before flag parsing goes to stderr.
W0806 11:29:38.519376 139999384954688 deprecation_wrapper.py:119] From /home/donovan/deepplantphenomics/deepplantphenomics/deepplantpheno.py:211: The name tf.Session is deprecated. Please use tf.compat.v1.Session instead.

2019-08-06 11:29:38.543240: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 3392290000 Hz
2019-08-06 11:29:38.544092: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x42e1f00 executing computations on platform Host. Devices:
2019-08-06 11:29:38.544127: I tensorflow/compiler/xla/service/service.cc:175]   StreamExecutor device (0): <undefined>, <undefined>
>>> model.set_problem_type('regression')
>>> model.set_loss_function('l2')
/home/donovan/deepplantphenomics/deepplantphenomics/deepplantpheno.py:448: UserWarning: Loss function and/or problem type not recognized. See documentation for list of supported functions and problem types.
  "functions and problem types.")

Process finished with exit code 0
jubbens commented 5 years ago

should be fixed in ab6991a . Thanks @donovanlavoie !