Keras-tuner search function throws Failed to create a NewWriteableFile error

前端 未结 3 1362
深忆病人
深忆病人 2021-01-06 15:17

The relatively new keras-tuner module for tensorflow-2 is causing the error \'Failed to create a NewWriteableFile\'. The tuner.search function is working, it is only after

3条回答
  •  囚心锁ツ
    2021-01-06 15:57

    I had the similas problem while using kerastuner in Windows and I've solved it:

    1. The first issue is that the path to the log directory may be too long. I had to reduced it.

    2. The second problem is that python (or tf) doens't work in Windows with mixed slashes. But kerastuner forms the path with backslashes. So I should provide the path with backslashes. I've done this with os.path.normpath() method:

    tuner=RandomSearch(build_model,objective='val_accuracy',max_trials=10,directory=os.path.normpath('C:/'))
    tuner.search(x_train,y_train,batch_size=256,epochs=30,validation_split=0.2,verbose=1)    
    

    Now I don't receive this error.

提交回复
热议问题