小编use*_*785的帖子

TensorFlow/TFLearn:ValueError:无法为Tensor u'target/Y:0'提供形状值(64,),其形状为'(?,10)'

我一直在尝试使用tflearn和我自己的数据集执行回归.

使用tflearn我一直在尝试使用MNIST数据集实现基于示例的卷积网络.我没有使用MNIST数据集,而是尝试用我自己的数据替换训练和测试数据.我的数据是从csv文件中读取的,与MNIST数据的形状不同.我有255个功能,代表15*15网格和目标值.在示例中,我将行替换为24-30(并包含import numpy as np):

#read in train and test csv's where there are 255 features (15*15) and a target
csvTrain = np.genfromtxt('train.csv', delimiter=",")
X = np.array(csvTrain[:, :225]) #225, 15
Y = csvTrain[:,225]

csvTest = np.genfromtxt('test.csv', delimiter=",")
testX = np.array(csvTest[:, :225])
testY = csvTest[:,225]

#reshape features for each instance in to 15*15, targets are just a single number
X = X.reshape([-1,15,15,1])
testX = testX.reshape([-1,15,15,1])

## Building convolutional network
network = input_data(shape=[None, 15, 15, 1], name='input')
Run Code Online (Sandbox Code Playgroud)

我收到以下错误: …

python deep-learning tensorflow

16
推荐指数
1
解决办法
2万
查看次数

为什么打开终端时会调用 conda?

我正在使用 Kubuntu 并安装了 anaconda。当我打开 Konsole(终端)时,在我获得命令行之前有一个轻微的停顿。轻微的暂停是由正在运行的 conda 进程引起的(查看 top 命令的输出)。我安装了最新版本的 anaconda,然后通过以下方式使用了 3.6 python 环境

conda install python=3.6
Run Code Online (Sandbox Code Playgroud)

(我使用尚未使用 3.7 的 tensorflow)

我之前用过旧版本的anaconda拿到3.6版,没看到这个问题。但是这次我尝试按照上面所示的推荐方式进行操作。

为什么 conda 在启动终端时运行,它在做什么,我该如何停止它?

编辑:添加到我的 bashrc 文件中的内容

# added by Anaconda3 5.3.1 installer
# >>> conda init >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$(CONDA_REPORT_ERRORS=false '/home/alex/anaconda3/bin/conda' shell.bash hook 2> /dev/null)" if [
$? -eq 0 ]; then
    \eval "$__conda_setup" else
if [ -f "/home/alex/anaconda3/etc/profile.d/conda.sh" ]; then
    . "/home/alex/anaconda3/etc/profile.d/conda.sh"
    CONDA_CHANGEPS1=false conda activate base
else
    \export …
Run Code Online (Sandbox Code Playgroud)

python ubuntu kde anaconda

1
推荐指数
1
解决办法
4191
查看次数

标签 统计

python ×2

anaconda ×1

deep-learning ×1

kde ×1

tensorflow ×1

ubuntu ×1