我们按照以下步骤实现了目标,
import tensorflow as tf
from tensorflow.python.keras.optimizers import Adam
from tensorflow.python.keras.callbacks import ModelCheckpoint, EarlyStopping, ReduceLROnPlateau, TerminateOnNaN, CSVLogger
from tensorflow.python.keras import backend as K
from tensorflow.python.keras.models import load_model
[173]box_height = self.this_scale * size // np.sqrt(ar)
[180]batch_size, feature_map_height, feature_map_width, feature_map_channels = x._shape_val
[182]batch_size, feature_map_channels, feature_map_height, feature_map_width = x._shape_val
[188]step_height = self.img_height // feature_map_height
[189]step_width = self.img_width // feature_map_width
[274]boxes_tensor, dtype='int32'), (K.shape(x)[0], 1, 1, 1, 1))
我们陷入了错误
TypeError: in converted code:
c:\Users\akilap\Desktop\Sprint 10\New folder\ssd_object_detection\SSD7-tf\keras_layers\keras_layer_AnchorBoxes.py:209 call *
cy = np.linspace(offset_height * step_height, (offset_height +
C:\Users\akilap\AppData\Local\Continuum\anaconda3\lib\site-packages\tensorflow\python\framework\tensor_shape.py:438 __rmul__
return self * other
TypeError: unsupported operand type(s) for *: 'Dimension' and 'float'
如果您能帮助我们,那将是一个很大的帮助!
谢谢。