【发布时间】:2017-06-28 22:13:49
【问题描述】:
我是深度学习的新手,正在尝试使用 Keras 在 R 中构建模型。我有 20,000 张 32x32x3 图像存储在一个数组中用于模型训练。当我运行时:
model = keras_model_sequential()
model %>% layer_input(shape = c(32,32,3))
我收到以下错误:
Error in py_call_impl(callable, dots$args, dots$keywords) :
TypeError: int() argument must be a string or a number, not 'Sequential'
Detailed traceback:
File "/home/abhijit331/.virtualenvs/r-tensorflow/lib/python2.7/site-packages/tensorflow/contrib/keras/python/keras/engine/topology.py", line 1380, in Input
input_tensor=tensor)
File "/home/abhijit331/.virtualenvs/r-tensorflow/lib/python2.7/site-packages/tensorflow/contrib/keras/python/keras/engine/topology.py", line 1287, in __init__
name=self.name)
File "/home/abhijit331/.virtualenvs/r-tensorflow/lib/python2.7/site-packages/tensorflow/contrib/keras/python/keras/backend.py", line 545, in placeholder
x = array_ops.placeholder(dtype, shape=shape, name=name)
File "/home/abhijit331/.virtualenvs/r-tensorflow/lib/python2.7/site-packages/tensorflow/python/ops/array_ops.py", line 1499, in placeholder
shape = tensor_shape.as_shape(shape)
File "/home/abhijit331/.virtualenvs/r-tensorflow/lib/python2.7/site-packages/tensorflow/python/framework/tensor_shape.py", line 80
谁能帮我弄清楚如何为我的模型设置输入层?
【问题讨论】:
标签: r python-2.7 deep-learning keras