关于keras使用tensorboard报错 'Sequential' object has no attribute '_get_distribution_strategy'问题解决方案

学习kears使用tensorboard时报错'Sequential' object has no attribute '_get_distribution_strategy'。

查询github后发现是keras与tensorflow兼容出了问题

解决方案为使用tensorflow的tensorboard

很简单:

第一:更改你的import  改为tensorflow

关于keras使用tensorboard报错 'Sequential' object has no attribute '_get_distribution_strategy'问题解决方案,

第二:callbacks里面也改一下:

关于keras使用tensorboard报错 'Sequential' object has no attribute '_get_distribution_strategy'问题解决方案

第三:model也要改一下 

关于keras使用tensorboard报错 'Sequential' object has no attribute '_get_distribution_strategy'问题解决方案

运行:

关于keras使用tensorboard报错 'Sequential' object has no attribute '_get_distribution_strategy'问题解决方案

问题解决