model.fit(np.array(data), np.array(labels), batch_size=32, epochs=3)
当我试图在另一个py文件中加载这个模型时..:我已经尝试过load_weights并抛出了一个错误ValueError: You are trying to load a weight file containing
我遇到了一些答案,这些回答说,当我们在.keras/models/目录中声明时,就会自动下载经过预先训练的模型权重文件。vgg=VGG16(weights='imagenet')我设法从目录中找到文件并将其复制到我的工作目录中。当我尝试加载模型时,脚本会返回错误。ValueError: You are trying to load a weight file
当我尝试使用keras的model.load_weights I get OSError: Unable to open file (Truncated file: eof = 41091072)加载权重时,下面是完整的错误跟踪:
model.load_weights(get_file(fname, "E:/Work/Practical\ Deep\ Learning\ Course/my\ notebooks