mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-30 14:35:15 +02:00
fixed or zero size models will now not raise an error when trying to optimize
This commit is contained in:
parent
f71fd8445d
commit
c2de25f918
1 changed files with 2 additions and 2 deletions
|
|
@ -234,9 +234,9 @@ class Model(Parameterized):
|
||||||
|
|
||||||
"""
|
"""
|
||||||
if self.is_fixed:
|
if self.is_fixed:
|
||||||
raise RuntimeError, "Cannot optimize, when everything is fixed"
|
print 'nothing to optimize'
|
||||||
if self.size == 0:
|
if self.size == 0:
|
||||||
raise RuntimeError, "Model without parameters cannot be optimized"
|
print 'nothing to optimize'
|
||||||
|
|
||||||
if start == None:
|
if start == None:
|
||||||
start = self.optimizer_array
|
start = self.optimizer_array
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue