问题
训练代码:
model.fit(graph, y, sample_weight=train_mask, batch_size=NUM, epochs=1, shuffle=False, verbose=0)
出现提示:
WARNING:tensorflow:sample_weight modes were coerced from … to [’…’]
原因
用的是tensorflow 2.1,2.2版就解决了这个问题
解决
安装tensorflow 2.2
python -m pip install --upgrade pip
pip install tensorflow-cpu==2.2.0 -i https://pypi.douban.com/simple/