tfslim"从头开始训练模型。"发生了某种错误

时间:2017-06-28 08:47:07

标签: python tensorflow deep-learning tf-slim

我正在训练

https://github.com/tensorflow/models/tree/master/slim

训练模型表格。发生了某种错误

我认为它的gpu和cpu运行问题。

其他代码对我很好。

但是发生了这个错误

我运行以下代码

A colon cannot be used in an unquoted mapping value at line 30 (near " csrf_token_generator: security.csrf.token_manager").

,错误是

# To get started with security, check out the documentation:
# https://symfony.com/doc/current/security.html
security:
    encoders:
        FOS\UserBundle\Model\UserInterface: bcrypt

role_hierarchy:
    ROLE_ADMIN:       ROLE_USER
    ROLE_SUPER_ADMIN: ROLE_ADMIN
# https://symfony.com/doc/current/security.html#b-configuring-how-users-are-loaded
providers:
#        in_memory:
#            memory: ~
    fos_userbundle:
        id: fos_user.user_provider.username

firewalls:
    main:
        pattern: ^/
            form_login:
                provider: fos_userbundle
                csrf_token_generator: security.csrf.token_manager

            logout:       true
            anonymous:    true
    # disables authentication for assets and the profiler, adapt it according to your needs
    dev:
        pattern: ^/(_(profiler|wdt)|css|images|js)/
        security: false

access_control:
    - { path: ^/login$, role: IS_AUTHENTICATED_ANONYMOUSLY }
    - { path: ^/register, role: IS_AUTHENTICATED_ANONYMOUSLY }
    - { path: ^/resetting, role: IS_AUTHENTICATED_ANONYMOUSLY }
    - { path: ^/admin/, role: ROLE_ADMIN }

1 个答案:

答案 0 :(得分:0)

它尝试在GPU上运行一些操作,但是TensorFlow没有看到GPU设备(因为你因为CUDA安装问题而使用TensorFlow的CPU版本,或者因为没有GPU)。看起来您可以指定--clone_on_cpu=True来代替使用CPU。