Function call stack: keras_scratch_graph Error

前端 未结 7 639
傲寒
傲寒 2021-01-02 01:57

I am reimplementing a text2speech project. I am facing a Function call stack : keras_scratch_graph error in decoder part. The network architecture is from D

7条回答
  •  误落风尘
    2021-01-02 02:46

    You need to add this code at the top of your script, it works for me on TensorFlow 2.2.0

    if tf.config.list_physical_devices('GPU'):
        physical_devices = tf.config.list_physical_devices('GPU')
        tf.config.experimental.set_memory_growth(physical_devices[0], enable=True)
        tf.config.experimental.set_virtual_device_configuration(physical_devices[0], [tf.config.experimental.VirtualDeviceConfiguration(memory_limit=4000)])
    

提交回复
热议问题