I am Charmie

メモとログ

pydot error on Keras

you might have an error of pydot when you use keras.utils.visualize_util.plot. The error says that "Couldn't import dot_parser, loading of dot files will not be possible."

The error is caused by incompatibility between pydot and pyparsing.

The solution is to edit the dot_parser.py as follows:

[code lang="python"] """ from pyparsing import version as pyparsing_version

from pyparsing import ( nestedExpr, Literal, CaselessLiteral, Word, Upcase, OneOrMore, ZeroOrMore, Forward, NotAny, delimitedList, oneOf, Group, Optional, Combine, alphas, nums, restOfLine, cStyleComment, nums, alphanums, printables, empty, quotedString, ParseException, ParseResults, CharsNotIn, _noncomma, dblQuotedString, QuotedString, ParserElement ) """

from pyparsing import ( nestedExpr, Literal, CaselessLiteral, Word, Upcase, OneOrMore, ZeroOrMore, Forward, NotAny, delimitedList, oneOf, Group, Optional, Combine, alphas, nums, restOfLine, cStyleComment, nums, alphanums, printables, empty, quotedString, ParseException, ParseResults, CharsNotIn, dblQuotedString, QuotedString, ParserElement ) [/code]