我正在学习推荐系统。我使用 Tensorflow 的随机森林。我的损失结果有问题。如何修复我的代码。帮我。
这是 x_data
shape=(6000,116)的值
,值为 0 或 1
array([[1, 0, 0, ..., 0, 0, 0],
[0, 0, 0, ..., 1, 0, 0],
[0, 0, 0, ..., 0, 0, 0],
...,
[0, 0, 0, ..., 1, 1, 0],
[0, 0, 0, ..., 0, 0, 1],
[0, 0, 0, ..., 0, 0, 1]])
Run Code Online (Sandbox Code Playgroud)
这是 y_data
shape=(6000,1)的值
,值为 0 或 1
array([[0],
[0],
[1],
...,
[0],
[0],
[0]])
Run Code Online (Sandbox Code Playgroud)
这是我的代码
def next_batch(x_data, y_data, batch_size):
if (len(x_data) != len(y_data)):
return None, None
batch_mask …Run Code Online (Sandbox Code Playgroud) recommendation-engine machine-learning python-3.x random-forest tensorflow