我试图创建UNET模型。 Unet代码结构的结尾部分如下。
double calculateDistance(
double lat1, double lon1, double lat2, double lon2) {
var p = 0.017453292519943295;
var c = cos;
var a = 0.5 -
c((lat2 - lat1) * p) / 2 +
c(lat1 * p) * c(lat2 * p) * (1 - c((lon2 - lon1) * p)) / 2;
var temp = 12742 * asin(sqrt(a));
return (temp * 1000);
}
但是,我在下面一行出现错误,因为“启用急切执行时,Tensor.op没有意义。问题”。我找不到解决此问题的方法。
...
deconv1 = Conv2DTranspose(n_filters * 1, (3, 3), strides=(2, 2), padding="same")(uconv2)
print(deconv1.shape, conv1.shape)
uconv1 = concatenate([deconv1, conv1])
uconv1 = Dropout(0.5)(uconv1)
uconv1 = conv2d_block(uconv1 ,n_filters * 1, kernel_size = 3, batchnorm = batchnorm)
output_layer = Conv2D(1, (1,1), padding="same", activation="sigmoid")(uconv1)