In keras 2.1.6, the existing code gives an error 'Sequential' object has no attribute 'constraints'. An issue has been created to address this issue.
It seems to me that the current version of keras no longer uses this member variable and the issue can be solved by simply removing the line self.constraints = self.locnet.constraints. I trained a usable spatial transformer network to verify the fix works.
Meanwhile, in the example file, I also updated Convolution2D layers to Conv2D layers to match the new keras interface.
In keras 2.1.6, the existing code gives an error
'Sequential' object has no attribute 'constraints'
. An issue has been created to address this issue.It seems to me that the current version of keras no longer uses this member variable and the issue can be solved by simply removing the line
self.constraints = self.locnet.constraints
. I trained a usable spatial transformer network to verify the fix works.Meanwhile, in the example file, I also updated
Convolution2D
layers toConv2D
layers to match the new keras interface.