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
In my case, the path exceeds the maximum length of path in windows because the length of generated path by Keras Turner is about 170. After I make my folder shorter, it works normally.
I had the similas problem while using kerastuner in Windows and I've solved it:
The first issue is that the path to the log directory may be too long. I had to reduced it.
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.
The problem it would appear is a Windows issue. Running the same code in a Linux environment had no issue in this regard.