我有一个这样的张量
Tensor("activation_1/Relu:0", shape=(?, 32, 32, 96), dtype=float32)
我想序列化该张量,以便在设备之间移动并重建它,但是使用Pickle或Dill似乎无法序列化
更新
张量是此模型块的结果。
`def conv_module(x, K, kX, kY, stride, padding="same"):
# define a CONV => BN => RELU pattern
x = Conv2D(K, (kX, kY), strides=stride, padding=padding)(x)
x = BatchNormalization()(x)
x = Activation("relu")(x)
# return the block
return x`
当前,我不使用急切执行,但是如果可以选择的话,我也可以这样做。