ml4a / ml4a

A python library and collection of notebooks for making art with machine learning.

Home Page:https://ml4a.net

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cartoonization notebook throws shape error with other images

javipus opened this issue · comments

The cartoonization notebook works as is, but it throws the following error when run with other images.

InvalidArgumentError: 2 root error(s) found.
  (0) Invalid argument: Incompatible shapes: [1,182,137,64] vs. [1,182,138,64]
	 [[{{node generator/add}}]]
	 [[add_1/_75]]
  (1) Invalid argument: Incompatible shapes: [1,182,137,64] vs. [1,182,138,64]
	 [[{{node generator/add}}]]

The issue seems to be an off-by-one error between the width that the image is downscaled/cropped to and the width that the model expects.

This has been fixed.