【发布时间】:2017-02-20 01:59:05
【问题描述】:
我有以下 theano 对象:
train_set_x = cPickle.load(f)
print (train_set_x.type, train_set_x.get_value().shape)
>>TensorType(float64, matrix) (1000000L, 64L)
但是,当我尝试对其进行切片时,会再次获得形状
train_set_x = train_set_x[:100]
print (train_set_x.type)
>>TensorType(float64, matrix)
n_train_batches = train_set_x.get_value(borrow=True).shape[0]
>>AttributeError: 'TensorVariable' object has no attribute 'get_value'
谁能给我解释一下为什么切片后会出现这个错误?
谢谢
【问题讨论】: