解决运行tensorboard时出现 tensorboard OSError:[Errno 22] Invalid argument

修改tensorboard中的manger.py

路径为:XXX\site-packages\tensorboard\manager.py

修改前

    serialized_type=int,  # seconds since epoch
    runtime_type=datetime.datetime,  # microseconds component ignored
    serialize=lambda dt: int(
         (dt - datetime.datetime.fromtimestamp(0)).total_seconds()),
    deserialize=lambda n: datetime.datetime.fromtimestamp(n),

修改后

    serialized_type=int,  # seconds since epoch
    runtime_type=datetime.datetime,  # microseconds component ignored
    # serialize=lambda dt: int(
    #     (dt - datetime.datetime.fromtimestamp(0)).total_seconds()),
    serialize=lambda dt: int(dt.strftime("%S")),
    deserialize=lambda n: datetime.datetime.fromtimestamp(n),

新添加语句中%S必须为大写

参考链接:

https://blog.csdn.net/u013244846/article/details/88380860

你可能感兴趣的:(解决运行tensorboard时出现 tensorboard OSError:[Errno 22] Invalid argument)