Row 5024
Content Data
This page contains data entry 5024 from the Axioma AXP content repository. The structured data below represents the complete record for this entry.
Newbie here to neural networks..
What are next steps that I can follow to resolve?
Getting this error message:
...
...
**ValueError: \`logits\` and \`labels\` must have the same shape, received ((20, 64) vs (20, 1)).**
​
My code is:
import tensorflow as tf
from tensorflow import keras
X\_train = X\_train.astype('float32')
y\_train = y\_train.astype('float32')
\# Fitting the ANN
history\_0 = model\_0.fit(
X\_train, y\_train,
batch\_size=20, ## Complete the code to specify the batch size to use
\#validation\_data=(X\_val,y\_val),
epochs=50, ## Complete the code to specify the number of epochs
verbose=1
​
| Field | Value |
|---|---|
| text | Newbie here to neural networks.. What are next steps that I can follow to resolve? Getting this error message: ... ... **ValueError: \`logits\` and \`labels\` must have the same shape, received ((20, 64) vs (20, 1)).** ​ My code is: import tensorflow as tf from tensorflow import keras X\_train = X\_train.astype('float32') y\_train = y\_train.astype('float32') \# Fitting the ANN history\_0 = model\_0.fit( X\_train, y\_train, batch\_size=20, ## Complete the code to speci… |
| label | r/neuralnetworks |
| dataType | post |
| communityName | r/neuralnetworks |
| datetime | 2024-04-25 |
| username_encoded | Z0FBQUFBQm5LakwyQWgtTHdKM2VIY3hVbFZhSDVJY3BHLUZvNnNSdUpZMXRQcEVzRk1yTDBnSXR6TjRXNUR2MzIzNEdVbXVmZk1pRFdKLTZ5eFV2OExjM2dpemFRTjRJLXc9PQ== |
| url_encoded | Z0FBQUFBQm5Lak9GV1ZTT0RrNkY4M0xubDNrRDhvSWxibzB6TXFEWENxN1RSdnBZMmVJWTcwZmdZTjlRV3VwSmVfUU0yNUJpLUJYRXFoaHJVZ25DQi05QVJrNkVOYmZVVVRBV1ZTN2JjN25WNUt5NV8ycU8zcmd0WVRLYy1uZDVKSk9STkdldXF3SlYxRWFRMlZ0b3l4c0F1QlV3cENlbldHcWltaWczVlphbFMyTmdXZTZqNjRxUERqUHNGMG1JMTBseTF0UUJfUlVva0k2c0U2cUhzbzM5QjgwYk5KY3BSUT09 |
Raw Record
{
"text": "Newbie here to neural networks..\n\nWhat are next steps that I can follow to resolve?\n\nGetting this error message:\n\n...\n\n...\n\n **ValueError: \\`logits\\` and \\`labels\\` must have the same shape, received ((20, 64) vs (20, 1)).** \n\n​\n\nMy code is:\n\nimport tensorflow as tf\n\nfrom tensorflow import keras\n\nX\\_train = X\\_train.astype('float32')\n\ny\\_train = y\\_train.astype('float32')\n\n\\# Fitting the ANN\n\nhistory\\_0 = model\\_0.fit(\n\nX\\_train, y\\_train,\n\nbatch\\_size=20, ## Complete the code to specify the batch size to use\n\n\\#validation\\_data=(X\\_val,y\\_val),\n\nepochs=50, ## Complete the code to specify the number of epochs\n\nverbose=1\n\n​",
"label": "r/neuralnetworks",
"dataType": "post",
"communityName": "r/neuralnetworks",
"datetime": "2024-04-25",
"username_encoded": "Z0FBQUFBQm5LakwyQWgtTHdKM2VIY3hVbFZhSDVJY3BHLUZvNnNSdUpZMXRQcEVzRk1yTDBnSXR6TjRXNUR2MzIzNEdVbXVmZk1pRFdKLTZ5eFV2OExjM2dpemFRTjRJLXc9PQ==",
"url_encoded": "Z0FBQUFBQm5Lak9GV1ZTT0RrNkY4M0xubDNrRDhvSWxibzB6TXFEWENxN1RSdnBZMmVJWTcwZmdZTjlRV3VwSmVfUU0yNUJpLUJYRXFoaHJVZ25DQi05QVJrNkVOYmZVVVRBV1ZTN2JjN25WNUt5NV8ycU8zcmd0WVRLYy1uZDVKSk9STkdldXF3SlYxRWFRMlZ0b3l4c0F1QlV3cENlbldHcWltaWczVlphbFMyTmdXZTZqNjRxUERqUHNGMG1JMTBseTF0UUJfUlVva0k2c0U2cUhzbzM5QjgwYk5KY3BSUT09"
}
Entry Information
- Entry ID: 5024
- Repository: Axioma AXP
- Dataset: arrmlet/reddit_dataset_36
- Total Entries: 100,000