How to set up theano config

后端 未结 5 411
面向向阳花
面向向阳花 2020-12-29 19:12

I\'m new to Theano. Trying to set up a config file.

First of all, I notice that I have no .theanorc file:

  1. locate .theanorc - returns nothi
5条回答
  •  暖寄归人
    2020-12-29 19:51

    In Linux in terminal Home directory write:

    nano .theanorc
    

    In the file copy the following lines

    [global]
    floatX = float32
    device = gpu0
    
    [lib]
    cnmem = 1   
    

    Save it.

    When I import theano in python I was having cnmem memory problems. Seems that is because the monitor is connected to the gpu. To resolve it change cnmem to 0.8. This number below 1 is the percentage of gpu reserved for theano

提交回复
热议问题