더 속성 'batch_matrix_band_part을'이없는 Convolutional Neural NetworksAttributeError : 모듈 'tensorflow은'나는이 웹 사이트에있는 운동을 해결하기 위해 노력
운동은 다음과 같습니다
The model architecture in inference() differs slightly from the CIFAR-10 model specified in cuda-convnet. In particular, the top layers of Alex's original model are locally connected and not fully connected. Try editing the architecture to exactly reproduce the locally connected architecture in the top layer.
나는 cifar10.py
에 (batch_matrix_band_part)
기능을 추가하려고 inference()::
with tf.variable_scope('softmax_linear') as scope:
weights = _variable_with_weight_decay('weights', [192, NUM_CLASSES],
stddev=1/192.0, wd=0.0)
biases = _variable_on_cpu('biases', [NUM_CLASSES],
tf.constant_initializer(0.0))
##softmax_linear = tf.add(tf.matmul(local4, weights), biases, name=scope.name) ## fully connection layer
WeightTemp = tf.batch_matrix_band_part(weights, -1, 1, name=None) ##using band matrix to be locally connected
## tf.batch_matrix_band_part(input, num_lower, num_upper, name=None)
softmax_linear= tf.add(tf.matmul(local4, weightTemp), biases, name-scope.name)
tf.nn.softmax(softmax_linear, dim=-1, name=None) ## for normalize the logits
_activation_summary(softmax_linear)
return softmax_linear
만의 마지막 부분이 나에게이 에로을 줄입니다 r ::
AttributeError: module 'tensorflow' has no attribute 'batch_matrix_band_part'
문제를 해결할 방법이 있습니까?