One of Four Conv2DTranspose Layer can not be mapped to TPU, it is in the middle, not the biggest one.

Description
tf version is 2.10
int8 tflite model has 4 Conv2DTranspose Layer.
int8 tflite model has uint8 input and output
edgetpu compiler version 16.x
When I edgetpu compile the tflite model, the third Conv2DTranspose layer can not be mapped to TPU while the other 3 can be.
This is my tflite model architecture:

This is my edgetpu tflite model architecture:

the tflite and edgetpu tflite model can be download here:
tflite_model: TFLite_INT8_Quantization_aware_training_UINT8_IN_OUT.tflite
edgetpu_tflite file : TFLite_INT8_Quantization_aware_training_UINT8_IN_OUT_edgetpu.tflite
The edgetpu compiler took me  10 minutes and 10+ times of  searching for intermedia tensor, and finally compiled successfully~~
My goal is to compile all the model or at least map the conv2dtranspose layer to tpu, because the conv2dtranspose layer is too slow at cpu, the whole model now take me 3 seconds to inference once, it is too slow~~ could you pls help me with that~~
the compile log is
(base) indeed@indeed-virtual-machine:~/Desktop/retina_tflite$ edgetpu_compiler -asd TFLite_INT8_Quantization_aware_training_UINT8_IN_OUT.tflite
Edge TPU Compiler version 16.0.384591198
Searching for valid delegate with step 1
Try to compile segment with 38 ops
Started a compilation timeout timer of 180 seconds.
Compilation child process completed within timeout period.
Compilation failed!
Try to compile segment with 37 ops
Intermediate tensors: UNET/quant_conv2d/Sigmoid
Started a compilation timeout timer of 180 seconds.
Compilation child process completed within timeout period.
Compilation failed!
Try to compile segment with 36 ops
Intermediate tensors: UNET/quant_conv2d/BiasAdd;UNET/quant_conv2d/Conv2D;UNET/quant_conv2d/BiasAdd/ReadVariableOp/resource
Started a compilation timeout timer of 180 seconds.
Compilation child process completed within timeout period.
Compilation failed!
Try to compile segment with 35 ops
Intermediate tensors: UNET/quant_DEC4_C2_relu/Relu;UNET/quant_DEC4_C2_bn/FusedBatchNormV3;UNET/quant_DEC4_C2_conv/BiasAdd/ReadVariableOp/resource;UNET/quant_DEC4_C2_conv/BiasAdd;UNET/quant_DEC4_C2_conv/Conv2D
Started a compilation timeout timer of 180 seconds.
Compilation child process completed within timeout period.
Compilation failed!
Try to compile segment with 34 ops
Intermediate tensors: UNET/quant_DEC4_C1_relu/Relu;UNET/quant_DEC4_C1_bn/FusedBatchNormV3;UNET/quant_DEC4_C1_conv/BiasAdd/ReadVariableOp/resource;UNET/quant_DEC4_C1_conv/BiasAdd;UNET/quant_DEC4_C2_conv/Conv2D;UNET/quant_DEC4_C1_conv/Conv2D
Started a compilation timeout timer of 180 seconds.
Compilation child process completed within timeout period.
Compilation failed!
Try to compile segment with 33 ops
Intermediate tensors: UNET/quant_DEC4_concat/concat
Started a compilation timeout timer of 180 seconds.
ERROR: Restored original execution plan after delegate application failure.
Compilation failed: Compilation failed due to large activation tensors in model.
Compilation child process completed within timeout period.
Compilation failed!
Try to compile segment with 32 ops
Intermediate tensors: UNET/quant_ENC1C2_relu/Relu;UNET/quant_ENC1C2_bn/FusedBatchNormV3;UNET/quant_ENC1C2_conv/BiasAdd/ReadVariableOp/resource;UNET/quant_ENC1C2_conv/BiasAdd;UNET/quant_DEC4_C2_conv/Conv2D;UNET/quant_ENC1C2_conv/Conv2D1,UNET/quant_DEC4_convTrans/BiasAdd;UNET/quant_DEC4_convTrans/conv2d_transpose;UNET/quant_DEC4_convTrans/BiasAdd/ReadVariableOp/resource
Started a compilation timeout timer of 180 seconds.
Compilation child process completed within timeout period.
Compilation failed!
Try to compile segment with 31 ops
Intermediate tensors: UNET/quant_ENC1C2_relu/Relu;UNET/quant_ENC1C2_bn/FusedBatchNormV3;UNET/quant_ENC1C2_conv/BiasAdd/ReadVariableOp/resource;UNET/quant_ENC1C2_conv/BiasAdd;UNET/quant_DEC4_C2_conv/Conv2D;UNET/quant_ENC1C2_conv/Conv2D,UNET/quant_DEC4_convTrans/BiasAdd;UNET/quant_DEC4_convTrans/conv2d_transpose;UNET/quant_DEC4_convTrans/BiasAdd/ReadVariableOp/resource
Started a compilation timeout timer of 180 seconds.
Compilation child process completed within timeout period.
Compilation failed!
Try to compile segment with 30 ops
Intermediate tensors: UNET/quant_DEC3_C2_relu/Relu;UNET/quant_DEC3_C2_bn/FusedBatchNormV3;UNET/quant_DEC3_C2_conv/BiasAdd/ReadVariableOp/resource;UNET/quant_DEC3_C2_conv/BiasAdd;UNET/quant_DEC3_C2_conv/Conv2D,UNET/quant_ENC1C2_relu/Relu;UNET/quant_ENC1C2_bn/FusedBatchNormV3;UNET/quant_ENC1C2_conv/BiasAdd/ReadVariableOp/resource;UNET/quant_ENC1C2_conv/BiasAdd;UNET/quant_DEC4_C2_conv/Conv2D;UNET/quant_ENC1C2_conv/Conv2D
Started a compilation timeout timer of 180 seconds.
Compilation child process completed within timeout period.
Compilation failed!
Try to compile segment with 29 ops
Intermediate tensors: UNET/quant_ENC1C2_relu/Relu;UNET/quant_ENC1C2_bn/FusedBatchNormV3;UNET/quant_ENC1C2_conv/BiasAdd/ReadVariableOp/resource;UNET/quant_ENC1C2_conv/BiasAdd;UNET/quant_DEC4_C2_conv/Conv2D;UNET/quant_ENC1C2_conv/Conv2D,UNET/quant_DEC3_C1_relu/Relu;UNET/quant_DEC3_C1_bn/FusedBatchNormV3;UNET/quant_DEC3_C1_conv/BiasAdd/ReadVariableOp/resource;UNET/quant_DEC3_C1_conv/BiasAdd;UNET/quant_DEC3_C2_conv/Conv2D;UNET/quant_DEC3_C1_conv/Conv2D
Started a compilation timeout timer of 180 seconds.
Compilation child process completed within timeout period.
Compilation failed!
Try to compile segment with 28 ops
Intermediate tensors: UNET/quant_ENC1C2_relu/Relu;UNET/quant_ENC1C2_bn/FusedBatchNormV3;UNET/quant_ENC1C2_conv/BiasAdd/ReadVariableOp/resource;UNET/quant_ENC1C2_conv/BiasAdd;UNET/quant_DEC4_C2_conv/Conv2D;UNET/quant_ENC1C2_conv/Conv2D,UNET/quant_DEC3_concat/concat
Started a compilation timeout timer of 180 seconds.
Compilation child process completed within timeout period.
Compilation failed!
Try to compile segment with 27 ops
Intermediate tensors: UNET/quant_DEC3_convTrans/BiasAdd;UNET/quant_DEC3_convTrans/conv2d_transpose;UNET/quant_DEC3_convTrans/BiasAdd/ReadVariableOp/resource,UNET/quant_ENC1C2_relu/Relu;UNET/quant_ENC1C2_bn/FusedBatchNormV3;UNET/quant_ENC1C2_conv/BiasAdd/ReadVariableOp/resource;UNET/quant_ENC1C2_conv/BiasAdd;UNET/quant_DEC4_C2_conv/Conv2D;UNET/quant_ENC1C2_conv/Conv2D,UNET/quant_ENC2C2_relu/Relu;UNET/quant_ENC2C2_bn/FusedBatchNormV3;UNET/quant_ENC2C2_conv/BiasAdd/ReadVariableOp/resource;UNET/quant_ENC2C2_conv/BiasAdd;UNET/quant_DEC3_C2_conv/Conv2D;UNET/quant_ENC2C2_conv/Conv2D1
Started a compilation timeout timer of 180 seconds.
ERROR: Restored original execution plan after delegate application failure.
Compilation failed: Compilation failed due to large activation tensors in model.
Compilation child process completed within timeout period.
Compilation failed!
Try to compile segment with 26 ops
Intermediate tensors: UNET/quant_ENC1C2_relu/Relu;UNET/quant_ENC1C2_bn/FusedBatchNormV3;UNET/quant_ENC1C2_conv/BiasAdd/ReadVariableOp/resource;UNET/quant_ENC1C2_conv/BiasAdd;UNET/quant_DEC4_C2_conv/Conv2D;UNET/quant_ENC1C2_conv/Conv2D,UNET/quant_ENC2C2_relu/Relu;UNET/quant_ENC2C2_bn/FusedBatchNormV3;UNET/quant_ENC2C2_conv/BiasAdd/ReadVariableOp/resource;UNET/quant_ENC2C2_conv/BiasAdd;UNET/quant_DEC3_C2_conv/Conv2D;UNET/quant_ENC2C2_conv/Conv2D,UNET/quant_DEC3_convTrans/BiasAdd;UNET/quant_DEC3_convTrans/conv2d_transpose;UNET/quant_DEC3_convTrans/BiasAdd/ReadVariableOp/resource
Started a compilation timeout timer of 180 seconds.
ERROR: Restored original execution plan after delegate application failure.
Compilation failed: Compilation failed due to large activation tensors in model.
Compilation child process completed within timeout period.
Compilation failed!
Try to compile segment with 25 ops
Intermediate tensors: UNET/quant_ENC1C2_relu/Relu;UNET/quant_ENC1C2_bn/FusedBatchNormV3;UNET/quant_ENC1C2_conv/BiasAdd/ReadVariableOp/resource;UNET/quant_ENC1C2_conv/BiasAdd;UNET/quant_DEC4_C2_conv/Conv2D;UNET/quant_ENC1C2_conv/Conv2D,UNET/quant_DEC2_C2_relu/Relu;UNET/quant_DEC2_C2_bn/FusedBatchNormV3;UNET/quant_DEC2_C2_conv/BiasAdd/ReadVariableOp/resource;UNET/quant_DEC2_C2_conv/BiasAdd;UNET/quant_DEC2_C2_conv/Conv2D,UNET/quant_ENC2C2_relu/Relu;UNET/quant_ENC2C2_bn/FusedBatchNormV3;UNET/quant_ENC2C2_conv/BiasAdd/ReadVariableOp/resource;UNET/quant_ENC2C2_conv/BiasAdd;UNET/quant_DEC3_C2_conv/Conv2D;UNET/quant_ENC2C2_conv/Conv2D
Started a compilation timeout timer of 180 seconds.

Model compiled successfully in 167533 ms.

Input model: TFLite_INT8_Quantization_aware_training_UINT8_IN_OUT.tflite
Input size: 29.77MiB
Output model: TFLite_INT8_Quantization_aware_training_UINT8_IN_OUT_edgetpu.tflite
Output size: 41.11MiB
On-chip memory used for caching model parameters: 2.99MiB
On-chip memory remaining for caching model parameters: 43.25KiB
Off-chip memory used for streaming uncached model parameters: 26.56MiB
Number of Edge TPU subgraphs: 4
Total number of operations: 38
Operation log: TFLite_INT8_Quantization_aware_training_UINT8_IN_OUT_edgetpu.log

Model successfully compiled but not all operations are supported by the Edge TPU. A percentage of the model will instead run on the CPU, which is slower. If possible, consider updating your model to use only operations supported by the Edge TPU. For details, visit g.co/coral/model-reqs.
Number of operations that will run on Edge TPU: 33
Number of operations that will run on CPU: 5

Operator                       Count      Status

CONV_2D                        19         Mapped to Edge TPU
TRANSPOSE_CONV                 3          Mapped to Edge TPU
TRANSPOSE_CONV                 1          More than one subgraph is not supported
QUANTIZE                       2          More than one subgraph is not supported
QUANTIZE                       4          Mapped to Edge TPU
LOGISTIC                       1          Mapped to Edge TPU
CONCATENATION                  4          Mapped to Edge TPU
MAX_POOL_2D                    2          Mapped to Edge TPU
MAX_POOL_2D                    2          More than one subgraph is not supported
Compilation child process completed within timeout period.
Compilation succeeded!
(base) indeed@indeed-virtual-machine:~/Desktop/retina_tflite$

Click to expand!
Issue Type
Support
Operating System
Ubuntu
Coral Device
Dev Board
Other Devices
No response
Programming Language
Python 3.7
Relevant Log Output
No response

Can you try the post integer quantization instead of quantization aware training to get a tflite model?

I had a try but end up with a failure~~~ The model can not be compiled even~~
I am going to share you with my tflite model and the edgetpu compiler log
TFLite file with uint8 input and output is :TFLite_INT8_post_training_Quantization_UINT8_IN_OUT.tflite
the log from edgetpu compiler, the compiler really try its best and searching for 34 steps in desprate~~~ :)
(base) indeed@indeed-virtual-machine:~/Desktop/retina_tflite$ edgetpu_compiler -asd TFLite_INT8_post_training_Quantization_UINT8_IN_OUT.tflite
Edge TPU Compiler version 16.0.384591198
Searching for valid delegate with step 1
Try to compile segment with 34 ops
Started a compilation timeout timer of 180 seconds.
Compilation child process completed within timeout period.
Compilation failed!
Try to compile segment with 33 ops
Intermediate tensors: StatefulPartitionedCall:01
Started a compilation timeout timer of 180 seconds.
Compilation child process completed within timeout period.
Compilation failed!
Try to compile segment with 32 ops
Intermediate tensors: UNET/preds/BiasAdd;UNET/preds/Conv2D;UNET/preds/BiasAdd/ReadVariableOp
Started a compilation timeout timer of 180 seconds.
Compilation child process completed within timeout period.
Compilation failed!
Try to compile segment with 31 ops
Intermediate tensors: UNET/DEC4_C2_relu/Relu;UNET/DEC4_C2_bn/FusedBatchNormV3;UNET/DEC4_C2_conv/BiasAdd/ReadVariableOp;UNET/DEC4_C2_conv/BiasAdd;UNET/DEC4_C2_conv/Conv2D1
Started a compilation timeout timer of 180 seconds.
Compilation child process completed within timeout period.
Compilation failed!
Try to compile segment with 30 ops
Intermediate tensors: UNET/DEC4_C1_relu/Relu;UNET/DEC4_C1_bn/FusedBatchNormV3;UNET/DEC4_C1_conv/BiasAdd/ReadVariableOp;UNET/DEC4_C1_conv/BiasAdd;UNET/DEC4_C2_conv/Conv2D;UNET/DEC4_C1_conv/Conv2D1
Started a compilation timeout timer of 180 seconds.
Compilation child process completed within timeout period.
Compilation failed!
Try to compile segment with 29 ops
Intermediate tensors: UNET/DEC4_concat/concat
Started a compilation timeout timer of 180 seconds.
ERROR: Restored original execution plan after delegate application failure.
Compilation failed: Compilation failed due to large activation tensors in model.
Compilation child process completed within timeout period.
Compilation failed!
Try to compile segment with 28 ops
Intermediate tensors: UNET/ENC1C2_relu/Relu;UNET/ENC1C2_bn/FusedBatchNormV3;UNET/ENC1C2_conv/BiasAdd/ReadVariableOp;UNET/ENC1C2_conv/BiasAdd;UNET/DEC4_C2_conv/Conv2D;UNET/ENC1C2_conv/Conv2D1,UNET/DEC4_convTrans/BiasAdd;UNET/DEC4_convTrans/conv2d_transpose;UNET/DEC4_convTrans/BiasAdd/ReadVariableOp
Started a compilation timeout timer of 180 seconds.
Compilation child process completed within timeout period.
Compilation failed!
Try to compile segment with 27 ops
Intermediate tensors: UNET/ENC1C2_relu/Relu;UNET/ENC1C2_bn/FusedBatchNormV3;UNET/ENC1C2_conv/BiasAdd/ReadVariableOp;UNET/ENC1C2_conv/BiasAdd;UNET/DEC4_C2_conv/Conv2D;UNET/ENC1C2_conv/Conv2D1,UNET/DEC3_C2_relu/Relu;UNET/DEC3_C2_bn/FusedBatchNormV3;UNET/DEC3_C2_conv/BiasAdd/ReadVariableOp;UNET/DEC3_C2_conv/BiasAdd;UNET/DEC3_C2_conv/Conv2D1
Started a compilation timeout timer of 180 seconds.
Compilation child process completed within timeout period.
Compilation failed!
Try to compile segment with 26 ops
Intermediate tensors: UNET/ENC1C2_relu/Relu;UNET/ENC1C2_bn/FusedBatchNormV3;UNET/ENC1C2_conv/BiasAdd/ReadVariableOp;UNET/ENC1C2_conv/BiasAdd;UNET/DEC4_C2_conv/Conv2D;UNET/ENC1C2_conv/Conv2D1,UNET/DEC3_C1_relu/Relu;UNET/DEC3_C1_bn/FusedBatchNormV3;UNET/DEC3_C1_conv/BiasAdd/ReadVariableOp;UNET/DEC3_C1_conv/BiasAdd;UNET/DEC3_C2_conv/Conv2D;UNET/DEC3_C1_conv/Conv2D1
Started a compilation timeout timer of 180 seconds.
Compilation child process completed within timeout period.
Compilation failed!
Try to compile segment with 25 ops
Intermediate tensors: UNET/ENC1C2_relu/Relu;UNET/ENC1C2_bn/FusedBatchNormV3;UNET/ENC1C2_conv/BiasAdd/ReadVariableOp;UNET/ENC1C2_conv/BiasAdd;UNET/DEC4_C2_conv/Conv2D;UNET/ENC1C2_conv/Conv2D1,UNET/DEC3_concat/concat
Started a compilation timeout timer of 180 seconds.
Compilation child process completed within timeout period.
Compilation failed!
Try to compile segment with 24 ops
Intermediate tensors: UNET/ENC1C2_relu/Relu;UNET/ENC1C2_bn/FusedBatchNormV3;UNET/ENC1C2_conv/BiasAdd/ReadVariableOp;UNET/ENC1C2_conv/BiasAdd;UNET/DEC4_C2_conv/Conv2D;UNET/ENC1C2_conv/Conv2D1,UNET/ENC2C2_relu/Relu;UNET/ENC2C2_bn/FusedBatchNormV3;UNET/ENC2C2_conv/BiasAdd/ReadVariableOp;UNET/ENC2C2_conv/BiasAdd;UNET/DEC3_C2_conv/Conv2D;UNET/ENC2C2_conv/Conv2D1,UNET/DEC3_convTrans/BiasAdd;UNET/DEC3_convTrans/conv2d_transpose;UNET/DEC3_convTrans/BiasAdd/ReadVariableOp
Started a compilation timeout timer of 180 seconds.
ERROR: Restored original execution plan after delegate application failure.
Compilation failed: Compilation failed due to large activation tensors in model.
Compilation child process completed within timeout period.
Compilation failed!
Try to compile segment with 23 ops
Intermediate tensors: UNET/DEC2_C2_relu/Relu;UNET/DEC2_C2_bn/FusedBatchNormV3;UNET/DEC2_C2_conv/BiasAdd/ReadVariableOp;UNET/DEC2_C2_conv/BiasAdd;UNET/DEC2_C2_conv/Conv2D1,UNET/ENC1C2_relu/Relu;UNET/ENC1C2_bn/FusedBatchNormV3;UNET/ENC1C2_conv/BiasAdd/ReadVariableOp;UNET/ENC1C2_conv/BiasAdd;UNET/DEC4_C2_conv/Conv2D;UNET/ENC1C2_conv/Conv2D1,UNET/ENC2C2_relu/Relu;UNET/ENC2C2_bn/FusedBatchNormV3;UNET/ENC2C2_conv/BiasAdd/ReadVariableOp;UNET/ENC2C2_conv/BiasAdd;UNET/DEC3_C2_conv/Conv2D;UNET/ENC2C2_conv/Conv2D1
Started a compilation timeout timer of 180 seconds.
ERROR: Restored original execution plan after delegate application failure.
Compilation failed: Compilation failed due to large activation tensors in model.
Compilation child process completed within timeout period.
Compilation failed!
Try to compile segment with 22 ops
Intermediate tensors: UNET/ENC1C2_relu/Relu;UNET/ENC1C2_bn/FusedBatchNormV3;UNET/ENC1C2_conv/BiasAdd/ReadVariableOp;UNET/ENC1C2_conv/BiasAdd;UNET/DEC4_C2_conv/Conv2D;UNET/ENC1C2_conv/Conv2D1,UNET/ENC2C2_relu/Relu;UNET/ENC2C2_bn/FusedBatchNormV3;UNET/ENC2C2_conv/BiasAdd/ReadVariableOp;UNET/ENC2C2_conv/BiasAdd;UNET/DEC3_C2_conv/Conv2D;UNET/ENC2C2_conv/Conv2D1,UNET/DEC2_C1_relu/Relu;UNET/DEC2_C1_bn/FusedBatchNormV3;UNET/DEC2_C1_conv/BiasAdd/ReadVariableOp;UNET/DEC2_C1_conv/BiasAdd;UNET/DEC2_C2_conv/Conv2D;UNET/DEC2_C1_conv/Conv2D1
Started a compilation timeout timer of 180 seconds.
ERROR: Restored original execution plan after delegate application failure.
Compilation failed: Compilation failed due to large activation tensors in model.
Compilation child process completed within timeout period.
Compilation failed!
Try to compile segment with 21 ops
Intermediate tensors: UNET/DEC2_concat/concat,UNET/ENC1C2_relu/Relu;UNET/ENC1C2_bn/FusedBatchNormV3;UNET/ENC1C2_conv/BiasAdd/ReadVariableOp;UNET/ENC1C2_conv/BiasAdd;UNET/DEC4_C2_conv/Conv2D;UNET/ENC1C2_conv/Conv2D1,UNET/ENC2C2_relu/Relu;UNET/ENC2C2_bn/FusedBatchNormV3;UNET/ENC2C2_conv/BiasAdd/ReadVariableOp;UNET/ENC2C2_conv/BiasAdd;UNET/DEC3_C2_conv/Conv2D;UNET/ENC2C2_conv/Conv2D1
Started a compilation timeout timer of 180 seconds.
ERROR: Restored original execution plan after delegate application failure.
Compilation failed: Compilation failed due to large activation tensors in model.
Compilation child process completed within timeout period.
Compilation failed!
Try to compile segment with 20 ops
Intermediate tensors: UNET/ENC1C2_relu/Relu;UNET/ENC1C2_bn/FusedBatchNormV3;UNET/ENC1C2_conv/BiasAdd/ReadVariableOp;UNET/ENC1C2_conv/BiasAdd;UNET/DEC4_C2_conv/Conv2D;UNET/ENC1C2_conv/Conv2D1,UNET/ENC2C2_relu/Relu;UNET/ENC2C2_bn/FusedBatchNormV3;UNET/ENC2C2_conv/BiasAdd/ReadVariableOp;UNET/ENC2C2_conv/BiasAdd;UNET/DEC3_C2_conv/Conv2D;UNET/ENC2C2_conv/Conv2D1,UNET/ENC3C2_relu/Relu;UNET/ENC3C2_bn/FusedBatchNormV3;UNET/ENC3C2_conv/BiasAdd/ReadVariableOp;UNET/ENC3C2_conv/BiasAdd;UNET/DEC2_C2_conv/Conv2D;UNET/ENC3C2_conv/Conv2D1,UNET/DEC2_convTrans/BiasAdd;UNET/DEC2_convTrans/conv2d_transpose;UNET/DEC2_convTrans/BiasAdd/ReadVariableOp
Started a compilation timeout timer of 180 seconds.
ERROR: Restored original execution plan after delegate application failure.
Compilation failed: Compilation failed due to large activation tensors in model.
Compilation child process completed within timeout period.
Compilation failed!
Try to compile segment with 19 ops
Intermediate tensors: UNET/ENC2C2_relu/Relu;UNET/ENC2C2_bn/FusedBatchNormV3;UNET/ENC2C2_conv/BiasAdd/ReadVariableOp;UNET/ENC2C2_conv/BiasAdd;UNET/DEC3_C2_conv/Conv2D;UNET/ENC2C2_conv/Conv2D1,UNET/ENC3C2_relu/Relu;UNET/ENC3C2_bn/FusedBatchNormV3;UNET/ENC3C2_conv/BiasAdd/ReadVariableOp;UNET/ENC3C2_conv/BiasAdd;UNET/DEC2_C2_conv/Conv2D;UNET/ENC3C2_conv/Conv2D1,UNET/ENC1C2_relu/Relu;UNET/ENC1C2_bn/FusedBatchNormV3;UNET/ENC1C2_conv/BiasAdd/ReadVariableOp;UNET/ENC1C2_conv/BiasAdd;UNET/DEC4_C2_conv/Conv2D;UNET/ENC1C2_conv/Conv2D1,UNET/DEC1_C2_relu/Relu;UNET/DEC1_C2_bn/FusedBatchNormV3;UNET/DEC1_C2_conv/BiasAdd/ReadVariableOp;UNET/DEC1_C2_conv/BiasAdd;UNET/DEC1_C2_conv/Conv2D1
Started a compilation timeout timer of 180 seconds.
ERROR: Restored original execution plan after delegate application failure.
Compilation failed: Compilation failed due to large activation tensors in model.
Compilation child process completed within timeout period.
Compilation failed!
Try to compile segment with 18 ops
Intermediate tensors: UNET/ENC3C2_relu/Relu;UNET/ENC3C2_bn/FusedBatchNormV3;UNET/ENC3C2_conv/BiasAdd/ReadVariableOp;UNET/ENC3C2_conv/BiasAdd;UNET/DEC2_C2_conv/Conv2D;UNET/ENC3C2_conv/Conv2D1,UNET/DEC1_C1_relu/Relu;UNET/DEC1_C1_bn/FusedBatchNormV3;UNET/DEC1_C1_conv/BiasAdd/ReadVariableOp;UNET/DEC1_C1_conv/BiasAdd;UNET/DEC1_C2_conv/Conv2D;UNET/DEC1_C1_conv/Conv2D1,UNET/ENC1C2_relu/Relu;UNET/ENC1C2_bn/FusedBatchNormV3;UNET/ENC1C2_conv/BiasAdd/ReadVariableOp;UNET/ENC1C2_conv/BiasAdd;UNET/DEC4_C2_conv/Conv2D;UNET/ENC1C2_conv/Conv2D1,UNET/ENC2C2_relu/Relu;UNET/ENC2C2_bn/FusedBatchNormV3;UNET/ENC2C2_conv/BiasAdd/ReadVariableOp;UNET/ENC2C2_conv/BiasAdd;UNET/DEC3_C2_conv/Conv2D;UNET/ENC2C2_conv/Conv2D1
Started a compilation timeout timer of 180 seconds.
ERROR: Restored original execution plan after delegate application failure.
Compilation failed: Compilation failed due to large activation tensors in model.
Compilation child process completed within timeout period.
Compilation failed!
Try to compile segment with 17 ops
Intermediate tensors: UNET/ENC1C2_relu/Relu;UNET/ENC1C2_bn/FusedBatchNormV3;UNET/ENC1C2_conv/BiasAdd/ReadVariableOp;UNET/ENC1C2_conv/BiasAdd;UNET/DEC4_C2_conv/Conv2D;UNET/ENC1C2_conv/Conv2D1,UNET/ENC2C2_relu/Relu;UNET/ENC2C2_bn/FusedBatchNormV3;UNET/ENC2C2_conv/BiasAdd/ReadVariableOp;UNET/ENC2C2_conv/BiasAdd;UNET/DEC3_C2_conv/Conv2D;UNET/ENC2C2_conv/Conv2D1,UNET/DEC1_concat/concat,UNET/ENC3C2_relu/Relu;UNET/ENC3C2_bn/FusedBatchNormV3;UNET/ENC3C2_conv/BiasAdd/ReadVariableOp;UNET/ENC3C2_conv/BiasAdd;UNET/DEC2_C2_conv/Conv2D;UNET/ENC3C2_conv/Conv2D1
Started a compilation timeout timer of 180 seconds.
ERROR: Restored original execution plan after delegate application failure.
Compilation failed: Compilation failed due to large activation tensors in model.
Compilation child process completed within timeout period.
Compilation failed!
Try to compile segment with 16 ops
Intermediate tensors: UNET/ENC1C2_relu/Relu;UNET/ENC1C2_bn/FusedBatchNormV3;UNET/ENC1C2_conv/BiasAdd/ReadVariableOp;UNET/ENC1C2_conv/BiasAdd;UNET/DEC4_C2_conv/Conv2D;UNET/ENC1C2_conv/Conv2D1,UNET/ENC2C2_relu/Relu;UNET/ENC2C2_bn/FusedBatchNormV3;UNET/ENC2C2_conv/BiasAdd/ReadVariableOp;UNET/ENC2C2_conv/BiasAdd;UNET/DEC3_C2_conv/Conv2D;UNET/ENC2C2_conv/Conv2D1,UNET/ENC4C2_relu/Relu;UNET/ENC4C2_bn/FusedBatchNormV3;UNET/ENC4C2_conv/BiasAdd/ReadVariableOp;UNET/ENC4C2_conv/BiasAdd;UNET/DEC1_C2_conv/Conv2D;UNET/ENC4C2_conv/Conv2D1,UNET/ENC3C2_relu/Relu;UNET/ENC3C2_bn/FusedBatchNormV3;UNET/ENC3C2_conv/BiasAdd/ReadVariableOp;UNET/ENC3C2_conv/BiasAdd;UNET/DEC2_C2_conv/Conv2D;UNET/ENC3C2_conv/Conv2D1,UNET/DEC1_convTrans/BiasAdd;UNET/DEC1_convTrans/conv2d_transpose;UNET/DEC1_convTrans/BiasAdd/ReadVariableOp
Started a compilation timeout timer of 180 seconds.
Compilation timeout. This is usually caused by large activations.
Compilation failed!
Try to compile segment with 15 ops
Intermediate tensors: UNET/ENC2C2_relu/Relu;UNET/ENC2C2_bn/FusedBatchNormV3;UNET/ENC2C2_conv/BiasAdd/ReadVariableOp;UNET/ENC2C2_conv/BiasAdd;UNET/DEC3_C2_conv/Conv2D;UNET/ENC2C2_conv/Conv2D1,UNET/ENC3C2_relu/Relu;UNET/ENC3C2_bn/FusedBatchNormV3;UNET/ENC3C2_conv/BiasAdd/ReadVariableOp;UNET/ENC3C2_conv/BiasAdd;UNET/DEC2_C2_conv/Conv2D;UNET/ENC3C2_conv/Conv2D1,UNET/BM_C2_relu/Relu;UNET/BM_C2_bn/FusedBatchNormV3;UNET/BM_C2_conv/BiasAdd/ReadVariableOp;UNET/BM_C2_conv/BiasAdd;UNET/BM_C2_conv/Conv2D1,UNET/ENC1C2_relu/Relu;UNET/ENC1C2_bn/FusedBatchNormV3;UNET/ENC1C2_conv/BiasAdd/ReadVariableOp;UNET/ENC1C2_conv/BiasAdd;UNET/DEC4_C2_conv/Conv2D;UNET/ENC1C2_conv/Conv2D1,UNET/ENC4C2_relu/Relu;UNET/ENC4C2_bn/FusedBatchNormV3;UNET/ENC4C2_conv/BiasAdd/ReadVariableOp;UNET/ENC4C2_conv/BiasAdd;UNET/DEC1_C2_conv/Conv2D;UNET/ENC4C2_conv/Conv2D1
Started a compilation timeout timer of 180 seconds.
Compilation timeout. This is usually caused by large activations.
Compilation failed!
Try to compile segment with 14 ops
Intermediate tensors: UNET/ENC3C2_relu/Relu;UNET/ENC3C2_bn/FusedBatchNormV3;UNET/ENC3C2_conv/BiasAdd/ReadVariableOp;UNET/ENC3C2_conv/BiasAdd;UNET/DEC2_C2_conv/Conv2D;UNET/ENC3C2_conv/Conv2D1,UNET/ENC4C2_relu/Relu;UNET/ENC4C2_bn/FusedBatchNormV3;UNET/ENC4C2_conv/BiasAdd/ReadVariableOp;UNET/ENC4C2_conv/BiasAdd;UNET/DEC1_C2_conv/Conv2D;UNET/ENC4C2_conv/Conv2D1,UNET/BM_C1_relu/Relu;UNET/BM_C1_bn/FusedBatchNormV3;UNET/BM_C1_conv/BiasAdd/ReadVariableOp;UNET/BM_C1_conv/BiasAdd;UNET/BM_C2_conv/Conv2D;UNET/BM_C1_conv/Conv2D1,UNET/ENC1C2_relu/Relu;UNET/ENC1C2_bn/FusedBatchNormV3;UNET/ENC1C2_conv/BiasAdd/ReadVariableOp;UNET/ENC1C2_conv/BiasAdd;UNET/DEC4_C2_conv/Conv2D;UNET/ENC1C2_conv/Conv2D1,UNET/ENC2C2_relu/Relu;UNET/ENC2C2_bn/FusedBatchNormV3;UNET/ENC2C2_conv/BiasAdd/ReadVariableOp;UNET/ENC2C2_conv/BiasAdd;UNET/DEC3_C2_conv/Conv2D;UNET/ENC2C2_conv/Conv2D1
Started a compilation timeout timer of 180 seconds.
Compilation timeout. This is usually caused by large activations.
Compilation failed!
Try to compile segment with 13 ops
Intermediate tensors: UNET/ENC3C2_relu/Relu;UNET/ENC3C2_bn/FusedBatchNormV3;UNET/ENC3C2_conv/BiasAdd/ReadVariableOp;UNET/ENC3C2_conv/BiasAdd;UNET/DEC2_C2_conv/Conv2D;UNET/ENC3C2_conv/Conv2D1,UNET/ENC4C2_relu/Relu;UNET/ENC4C2_bn/FusedBatchNormV3;UNET/ENC4C2_conv/BiasAdd/ReadVariableOp;UNET/ENC4C2_conv/BiasAdd;UNET/DEC1_C2_conv/Conv2D;UNET/ENC4C2_conv/Conv2D1,UNET/ENC4_MaxP/MaxPool,UNET/ENC1C2_relu/Relu;UNET/ENC1C2_bn/FusedBatchNormV3;UNET/ENC1C2_conv/BiasAdd/ReadVariableOp;UNET/ENC1C2_conv/BiasAdd;UNET/DEC4_C2_conv/Conv2D;UNET/ENC1C2_conv/Conv2D1,UNET/ENC2C2_relu/Relu;UNET/ENC2C2_bn/FusedBatchNormV3;UNET/ENC2C2_conv/BiasAdd/ReadVariableOp;UNET/ENC2C2_conv/BiasAdd;UNET/DEC3_C2_conv/Conv2D;UNET/ENC2C2_conv/Conv2D1
Started a compilation timeout timer of 180 seconds.
Compilation timeout. This is usually caused by large activations.
Compilation failed!
Try to compile segment with 12 ops
Intermediate tensors: UNET/ENC2C2_relu/Relu;UNET/ENC2C2_bn/FusedBatchNormV3;UNET/ENC2C2_conv/BiasAdd/ReadVariableOp;UNET/ENC2C2_conv/BiasAdd;UNET/DEC3_C2_conv/Conv2D;UNET/ENC2C2_conv/Conv2D1,UNET/ENC3C2_relu/Relu;UNET/ENC3C2_bn/FusedBatchNormV3;UNET/ENC3C2_conv/BiasAdd/ReadVariableOp;UNET/ENC3C2_conv/BiasAdd;UNET/DEC2_C2_conv/Conv2D;UNET/ENC3C2_conv/Conv2D1,UNET/ENC1C2_relu/Relu;UNET/ENC1C2_bn/FusedBatchNormV3;UNET/ENC1C2_conv/BiasAdd/ReadVariableOp;UNET/ENC1C2_conv/BiasAdd;UNET/DEC4_C2_conv/Conv2D;UNET/ENC1C2_conv/Conv2D1,UNET/ENC4C2_relu/Relu;UNET/ENC4C2_bn/FusedBatchNormV3;UNET/ENC4C2_conv/BiasAdd/ReadVariableOp;UNET/ENC4C2_conv/BiasAdd;UNET/DEC1_C2_conv/Conv2D;UNET/ENC4C2_conv/Conv2D1
Started a compilation timeout timer of 180 seconds.
Compilation timeout. This is usually caused by large activations.
Compilation failed!
Try to compile segment with 11 ops
Intermediate tensors: UNET/ENC3C2_relu/Relu;UNET/ENC3C2_bn/FusedBatchNormV3;UNET/ENC3C2_conv/BiasAdd/ReadVariableOp;UNET/ENC3C2_conv/BiasAdd;UNET/DEC2_C2_conv/Conv2D;UNET/ENC3C2_conv/Conv2D1,UNET/ENC4C1_relu/Relu;UNET/ENC4C1_bn/FusedBatchNormV3;UNET/ENC4C1_conv/BiasAdd/ReadVariableOp;UNET/ENC4C1_conv/BiasAdd;UNET/DEC1_C2_conv/Conv2D;UNET/ENC4C1_conv/Conv2D1,UNET/ENC1C2_relu/Relu;UNET/ENC1C2_bn/FusedBatchNormV3;UNET/ENC1C2_conv/BiasAdd/ReadVariableOp;UNET/ENC1C2_conv/BiasAdd;UNET/DEC4_C2_conv/Conv2D;UNET/ENC1C2_conv/Conv2D1,UNET/ENC2C2_relu/Relu;UNET/ENC2C2_bn/FusedBatchNormV3;UNET/ENC2C2_conv/BiasAdd/ReadVariableOp;UNET/ENC2C2_conv/BiasAdd;UNET/DEC3_C2_conv/Conv2D;UNET/ENC2C2_conv/Conv2D1
Started a compilation timeout timer of 180 seconds.
Compilation timeout. This is usually caused by large activations.
Compilation failed!
Try to compile segment with 10 ops
Intermediate tensors: UNET/ENC2C2_relu/Relu;UNET/ENC2C2_bn/FusedBatchNormV3;UNET/ENC2C2_conv/BiasAdd/ReadVariableOp;UNET/ENC2C2_conv/BiasAdd;UNET/DEC3_C2_conv/Conv2D;UNET/ENC2C2_conv/Conv2D1,UNET/ENC3C2_relu/Relu;UNET/ENC3C2_bn/FusedBatchNormV3;UNET/ENC3C2_conv/BiasAdd/ReadVariableOp;UNET/ENC3C2_conv/BiasAdd;UNET/DEC2_C2_conv/Conv2D;UNET/ENC3C2_conv/Conv2D1,UNET/ENC1C2_relu/Relu;UNET/ENC1C2_bn/FusedBatchNormV3;UNET/ENC1C2_conv/BiasAdd/ReadVariableOp;UNET/ENC1C2_conv/BiasAdd;UNET/DEC4_C2_conv/Conv2D;UNET/ENC1C2_conv/Conv2D1,UNET/ENC3_MaxP/MaxPool
Started a compilation timeout timer of 180 seconds.
ERROR: Restored original execution plan after delegate application failure.
Compilation failed: Compilation failed due to large activation tensors in model.
Compilation child process completed within timeout period.
Compilation failed!
Try to compile segment with 9 ops
Intermediate tensors: UNET/ENC3C2_relu/Relu;UNET/ENC3C2_bn/FusedBatchNormV3;UNET/ENC3C2_conv/BiasAdd/ReadVariableOp;UNET/ENC3C2_conv/BiasAdd;UNET/DEC2_C2_conv/Conv2D;UNET/ENC3C2_conv/Conv2D1,UNET/ENC1C2_relu/Relu;UNET/ENC1C2_bn/FusedBatchNormV3;UNET/ENC1C2_conv/BiasAdd/ReadVariableOp;UNET/ENC1C2_conv/BiasAdd;UNET/DEC4_C2_conv/Conv2D;UNET/ENC1C2_conv/Conv2D1,UNET/ENC2C2_relu/Relu;UNET/ENC2C2_bn/FusedBatchNormV3;UNET/ENC2C2_conv/BiasAdd/ReadVariableOp;UNET/ENC2C2_conv/BiasAdd;UNET/DEC3_C2_conv/Conv2D;UNET/ENC2C2_conv/Conv2D1
Started a compilation timeout timer of 180 seconds.
Compilation timeout. This is usually caused by large activations.
Compilation failed!
Try to compile segment with 8 ops
Intermediate tensors: UNET/ENC3C1_relu/Relu;UNET/ENC3C1_bn/FusedBatchNormV3;UNET/ENC3C1_conv/BiasAdd/ReadVariableOp;UNET/ENC3C1_conv/BiasAdd;UNET/DEC2_C2_conv/Conv2D;UNET/ENC3C1_conv/Conv2D1,UNET/ENC2C2_relu/Relu;UNET/ENC2C2_bn/FusedBatchNormV3;UNET/ENC2C2_conv/BiasAdd/ReadVariableOp;UNET/ENC2C2_conv/BiasAdd;UNET/DEC3_C2_conv/Conv2D;UNET/ENC2C2_conv/Conv2D1,UNET/ENC1C2_relu/Relu;UNET/ENC1C2_bn/FusedBatchNormV3;UNET/ENC1C2_conv/BiasAdd/ReadVariableOp;UNET/ENC1C2_conv/BiasAdd;UNET/DEC4_C2_conv/Conv2D;UNET/ENC1C2_conv/Conv2D1
Started a compilation timeout timer of 180 seconds.
ERROR: Restored original execution plan after delegate application failure.
Compilation failed: Compilation failed due to large activation tensors in model.
Compilation child process completed within timeout period.
Compilation failed!
Try to compile segment with 7 ops
Intermediate tensors: UNET/ENC1C2_relu/Relu;UNET/ENC1C2_bn/FusedBatchNormV3;UNET/ENC1C2_conv/BiasAdd/ReadVariableOp;UNET/ENC1C2_conv/BiasAdd;UNET/DEC4_C2_conv/Conv2D;UNET/ENC1C2_conv/Conv2D1,UNET/ENC2C2_relu/Relu;UNET/ENC2C2_bn/FusedBatchNormV3;UNET/ENC2C2_conv/BiasAdd/ReadVariableOp;UNET/ENC2C2_conv/BiasAdd;UNET/DEC3_C2_conv/Conv2D;UNET/ENC2C2_conv/Conv2D1,UNET/ENC2_MaxP/MaxPool
Started a compilation timeout timer of 180 seconds.
ERROR: Restored original execution plan after delegate application failure.
Compilation failed: Compilation failed due to large activation tensors in model.
Compilation child process completed within timeout period.
Compilation failed!
Try to compile segment with 6 ops
Intermediate tensors: UNET/ENC1C2_relu/Relu;UNET/ENC1C2_bn/FusedBatchNormV3;UNET/ENC1C2_conv/BiasAdd/ReadVariableOp;UNET/ENC1C2_conv/BiasAdd;UNET/DEC4_C2_conv/Conv2D;UNET/ENC1C2_conv/Conv2D1,UNET/ENC2C2_relu/Relu;UNET/ENC2C2_bn/FusedBatchNormV3;UNET/ENC2C2_conv/BiasAdd/ReadVariableOp;UNET/ENC2C2_conv/BiasAdd;UNET/DEC3_C2_conv/Conv2D;UNET/ENC2C2_conv/Conv2D1
Started a compilation timeout timer of 180 seconds.
ERROR: Restored original execution plan after delegate application failure.
Compilation failed: Compilation failed due to large activation tensors in model.
Compilation child process completed within timeout period.
Compilation failed!
Try to compile segment with 5 ops
Intermediate tensors: UNET/ENC1C2_relu/Relu;UNET/ENC1C2_bn/FusedBatchNormV3;UNET/ENC1C2_conv/BiasAdd/ReadVariableOp;UNET/ENC1C2_conv/BiasAdd;UNET/DEC4_C2_conv/Conv2D;UNET/ENC1C2_conv/Conv2D1,UNET/ENC2C1_relu/Relu;UNET/ENC2C1_bn/FusedBatchNormV3;UNET/ENC2C1_conv/BiasAdd/ReadVariableOp;UNET/ENC2C1_conv/BiasAdd;UNET/DEC3_C2_conv/Conv2D;UNET/ENC2C1_conv/Conv2D1
Started a compilation timeout timer of 180 seconds.
Compilation child process completed within timeout period.
Compilation failed!
Try to compile segment with 4 ops
Intermediate tensors: UNET/ENC1C2_relu/Relu;UNET/ENC1C2_bn/FusedBatchNormV3;UNET/ENC1C2_conv/BiasAdd/ReadVariableOp;UNET/ENC1C2_conv/BiasAdd;UNET/DEC4_C2_conv/Conv2D;UNET/ENC1C2_conv/Conv2D1,UNET/ENC1_MaxP/MaxPool
Started a compilation timeout timer of 180 seconds.
Compilation child process completed within timeout period.
Compilation failed!
Try to compile segment with 3 ops
Intermediate tensors: UNET/ENC1C2_relu/Relu;UNET/ENC1C2_bn/FusedBatchNormV3;UNET/ENC1C2_conv/BiasAdd/ReadVariableOp;UNET/ENC1C2_conv/BiasAdd;UNET/DEC4_C2_conv/Conv2D;UNET/ENC1C2_conv/Conv2D1
Started a compilation timeout timer of 180 seconds.
Compilation child process completed within timeout period.
Compilation failed!
Try to compile segment with 2 ops
Intermediate tensors: UNET/ENC1C1_relu/Relu;UNET/ENC1C1_bn/FusedBatchNormV3;UNET/ENC1C1_conv/BiasAdd/ReadVariableOp;UNET/ENC1C1_conv/BiasAdd;UNET/DEC4_C2_conv/Conv2D;UNET/ENC1C1_conv/Conv2D1
Started a compilation timeout timer of 180 seconds.
Compilation child process completed within timeout period.
Compilation failed!
Try to compile segment with 1 ops
Intermediate tensors: tfl.quantize
Started a compilation timeout timer of 180 seconds.
Compilation child process completed within timeout period.
Compilation failed!
Error: search for valid delegate failed. Can not compile model for Edge TPU.
(base) indeed@indeed-virtual-machine:~/Desktop/retina_tflite$

It is possible to compile by spiting the post integer quantization model with -n flag. But I don't see much gain in inference time. The best thing for this model is to try with the  reduced the input size(512, 512) in order to lower the inference time.

Q1: -n flag should appoint a integer with it to tell the compiler how many sub-graph to be segment~~~ what integer should i use?
Q2:  if i use -n flag, compiler will produce more than one tflite file, does that mean i have to use more than one edgetpu hardware to get the more than one tflite files running?
the inference time is now my first concert, i just want to map all the ops to the edgetpu.  because in my experience this unet model is 1/2 paramenters  and even 1/3  computation requirements than yolov4~~~ my yolov4 model can run on an edgetpu at 3 fps, so i guess after mapping all ops of this unet model to edgetpu , the fps should go up to 4fps or 5fps, it is acceptable~~~
of course , i can gain more fps by reducing the input size from 512 to 256 or even lower, but at first  we should map all ops to edgetpu first, isn't it~~~
need your instruction, and thank you~~

this is the logs when i compile yolov4 full model for edgetpu:
there are three sub-graphs and on chip memory is all used and off chip memory is 55MB
the compile command i use has -s -a -i which is under your instructiondo you remember  :)
edgetpu_compiler -s -a -i "model/p_re_lu_74/add;model/p_re_lu_74/Relu;model/p_re_lu_74/Neg_1;model/p_re_lu_74/Relu_1;model/p_re_lu_74/mul"  yolov4_realds5717_clip5.tflite
Input model: yolov4_realds5717_clip5.tflite
Input size: 62.41MiB
Output model: yolov4_realds5717_clip5_edgetpu.tflite
Output size: 64.63MiB
On-chip memory used for caching model parameters: 6.85MiB
On-chip memory remaining for caching model parameters: 0.00B
Off-chip memory used for streaming uncached model parameters: 54.98MiB
Number of Edge TPU subgraphs: 3
Total number of operations: 534
Operation log: yolov4_realds5717_clip5_edgetpu.log
Although not all the ops is mapped to edgetpu but all the conv2D layers all mapped to edgetpu as you can see. that means the model can be accelerated maximum~~~ because the maxpool or concatence layer usually do not require too much computation resource~~~
Input model: yolov4_realds5717_clip5.tflite
Input size: 62.41MiB
Output model: yolov4_realds5717_clip5_edgetpu.tflite
Output size: 64.63MiB
On-chip memory used for caching model parameters: 6.85MiB
On-chip memory remaining for caching model parameters: 0.00B
Off-chip memory used for streaming uncached model parameters: 54.98MiB
Number of Edge TPU subgraphs: 3
Total number of operations: 534
Operation log: yolov4_realds5717_clip5_edgetpu.log

Model successfully compiled but not all operations are supported by the Edge TPU. A percentage of the model will instead run on the CPU, which is slower. If possible, consider updating your model to use only operations supported by the Edge TPU. For details, visit g.co/coral/model-reqs.
Number of operations that will run on Edge TPU: 495
Number of operations that will run on CPU: 39

Operator                       Count      Status

PRELU                          107        Mapped to Edge TPU
CONCATENATION                  23         Mapped to Edge TPU
CONCATENATION                  1          Operation is otherwise supported, but not mapped due to some unspecified limitation
CONCATENATION                  1          More than one subgraph is not supported
RELU                           18         Mapped to Edge TPU
SUB                            18         Mapped to Edge TPU
DEQUANTIZE                     11         Operation is working on an unsupported data type
MUL                            1          Operation is otherwise supported, but not mapped due to some unspecified limitation
MUL                            36         Mapped to Edge TPU
MINIMUM                        27         Mapped to Edge TPU
ADD                            41         Mapped to Edge TPU
MAX_POOL_2D                    3          More than one subgraph is not supported
RESHAPE                        24         Mapped to Edge TPU
RESHAPE                        3          Operation is otherwise supported, but not mapped due to some unspecified limitation
PAD                            7          Mapped to Edge TPU
LOGISTIC                       27         Mapped to Edge TPU
SPLIT_V                        6          Mapped to Edge TPU
RESIZE_NEAREST_NEIGHBOR        2          Mapped to Edge TPU
MAXIMUM                        9          Mapped to Edge TPU
QUANTIZE                       40         Mapped to Edge TPU
QUANTIZE                       10         Operation is otherwise supported, but not mapped due to some unspecified limitation
CONV_2D                        110        Mapped to Edge TPU
EXP                            9          Operation is working on an unsupported data type
Compilation child process completed within timeout period.
Compilation succeeded!

So , how can i map the conv2d and conv2dtranspose layer of my unet model to edgetpu ~this is the bottle neck of solving my  problemthanks~~

Q1: -n flag should appoint a integer with it to tell the compiler how many sub-graph to be segment~~~ what integer should i use? Q2: if i use -n flag, compiler will produce more than one tflite file, does that mean i have to use more than one edgetpu hardware to get the more than one tflite files running?
Yes, you would need number of TPUs equals to the number of segments. You can try this model with ether 2 or 3. But, you won't be able to map all conv2dtranspose ops to TPU. https://coral.ai/docs/edgetpu/compiler/#model-segmentation

the inference time is now my first concert, i just want to map all the ops to the edgetpu. because in my experience this unet model is 1/2 paramenters and even 1/3 computation requirements than yolov4~~~ my yolov4 model can run on an edgetpu at 3 fps, so i guess after mapping all ops of this unet model to edgetpu , the fps should go up to 4fps or 5fps, it is acceptable~~~ of course , i can gain more fps by reducing the input size from 512 to 256 or even lower, but at first we should map all ops to edgetpu first, isn't it~~~ need your instruction, and thank you~~

I think, you might be able to map all ops to TPU if you lower the size to 256.

i will try reduce the model input size to 256 then...but the accuracy will reduce along...
my question is, is there any solution to remain the resolution at 512 but map all the conv2d and conv2dtranspose layers to edgetpu. i can accept that some concatece layer or maxpool layer mapped to cpu, but i want all the conv2d and conv2dtransposet layers mapped to edgetpu... because the quantity of conv2d layers and conv2dtranspose layer is much less than yolov4, since yolov4 can be mapped to edgetpu why unet can not....whether there are any reasons or restrictions with conv2dtranspose?
thank you

let me update and share some information:

parameters. I have try several time with three input resolution, with two quantization methods.
Input resolutions are 512by512 pixel, 416 by 416, 256 by 256. Q methods are quantization aware training and post training Q
use QWT short for Quantization Aware Training, use PTQ short for Post-Training Quantization
2.1 512 and QWT, Successfull, FPS is 0.16FPS

Model compiled successfully in 167533 ms.

Input model: TFLite_INT8_Quantization_aware_training_UINT8_IN_OUT.tflite
Input size: 29.77MiB
Output model: TFLite_INT8_Quantization_aware_training_UINT8_IN_OUT_edgetpu.tflite
Output size: 41.11MiB
On-chip memory used for caching model parameters: 2.99MiB
On-chip memory remaining for caching model parameters: 43.25KiB
Off-chip memory used for streaming uncached model parameters: 26.56MiB
Number of Edge TPU subgraphs: 4
Total number of operations: 38
Operation log: TFLite_INT8_Quantization_aware_training_UINT8_IN_OUT_edgetpu.log

Model successfully compiled but not all operations are supported by the Edge TPU. A percentage of the model will instead run on the CPU, which is slower. If possible, consider updating your model to use only operations supported by the Edge TPU. For details, visit g.co/coral/model-reqs.
Number of operations that will run on Edge TPU: 33
Number of operations that will run on CPU: 5

Operator                       Count      Status

CONV_2D                        19         Mapped to Edge TPU
TRANSPOSE_CONV                 3          Mapped to Edge TPU
TRANSPOSE_CONV                 1          More than one subgraph is not supported
QUANTIZE                       2          More than one subgraph is not supported
QUANTIZE                       4          Mapped to Edge TPU
LOGISTIC                       1          Mapped to Edge TPU
CONCATENATION                  4          Mapped to Edge TPU
MAX_POOL_2D                    2          Mapped to Edge TPU
MAX_POOL_2D                    2          More than one subgraph is not supported
Compilation child process completed within timeout period.
Compilation succeeded!

2.2 512 and PTQ, Fail, FPS None
2.3 416 and QWT, Successfull, FPS is 0.45FPS
Model compiled successfully in 39687 ms.

Input model: TFLite_INT8_pixel416_Quantization_aware_training_UINT8_IN_OUT.tflite
Input size: 29.77MiB
Output model: TFLite_INT8_pixel416_Quantization_aware_training_UINT8_IN_OUT_edgetpu.tflite
Output size: 36.25MiB
On-chip memory used for caching model parameters: 4.04MiB
On-chip memory remaining for caching model parameters: 55.75KiB
Off-chip memory used for streaming uncached model parameters: 25.51MiB
Number of Edge TPU subgraphs: 4
Total number of operations: 38
Operation log: TFLite_INT8_pixel416_Quantization_aware_training_UINT8_IN_OUT_edgetpu.log

Model successfully compiled but not all operations are supported by the Edge TPU. A percentage of the model will instead run on the CPU, which is slower. If possible, consider updating your model to use only operations supported by the Edge TPU. For details, visit g.co/coral/model-reqs.
Number of operations that will run on Edge TPU: 33
Number of operations that will run on CPU: 5

Operator                       Count      Status

MAX_POOL_2D                    2          More than one subgraph is not supported
MAX_POOL_2D                    2          Mapped to Edge TPU
CONCATENATION                  4          Mapped to Edge TPU
LOGISTIC                       1          Mapped to Edge TPU
QUANTIZE                       4          Mapped to Edge TPU
QUANTIZE                       2          More than one subgraph is not supported
TRANSPOSE_CONV                 3          Mapped to Edge TPU
TRANSPOSE_CONV                 1          More than one subgraph is not supported
CONV_2D                        19         Mapped to Edge TPU
Compilation child process completed within timeout period.
Compilation succeeded!

2.4 416 and PTQ, not try yet, FPS is None
2.5 256 and QWT, Successfully, FPS is 6FPS
Model compiled successfully in 24061 ms.

Input model: TFLite_pixel256_INT8_Quantization_aware_training_UINT8_IN_OUT.tflite
Input size: 29.77MiB
Output model: TFLite_pixel256_INT8_Quantization_aware_training_UINT8_IN_OUT_edgetpu.tflite
Output size: 33.54MiB
On-chip memory used for caching model parameters: 6.21MiB
On-chip memory remaining for caching model parameters: 9.75KiB
Off-chip memory used for streaming uncached model parameters: 23.46MiB
Number of Edge TPU subgraphs: 1
Total number of operations: 38
Operation log: TFLite_pixel256_INT8_Quantization_aware_training_UINT8_IN_OUT_edgetpu.log

Operator                       Count      Status

CONV_2D                        19         Mapped to Edge TPU
LOGISTIC                       1          Mapped to Edge TPU
MAX_POOL_2D                    4          Mapped to Edge TPU
CONCATENATION                  4          Mapped to Edge TPU
QUANTIZE                       6          Mapped to Edge TPU
TRANSPOSE_CONV                 4          Mapped to Edge TPU
Compilation child process completed within timeout period.
Compilation succeeded!

2.6 256 and PTQ, not try yet, FPS is None

The memory on chip is only 8M, maybe it is the memory size which is responsable for the Only One Conv2DTranpose Ops which can not be mapped to EdgeTPU. If it is so, there is no way to make the UNet bigger than 256 resolution mapped to TPU overral~~~
Am I right?~~~if so, would you pls give me any more information about how to utilize the memory on-chip most...Thank you

If possible, you may try splitting the unmapped conv2dtranspose for model size 512. Otherwise you have to go with lower input size to run all ops in TPU..

thanks for you reply...but , what do you mean by "splitting" the conv2dtranspose  layer. do you mean split the output the conv2dtranspose layer or find a equivalent ops to replace the conv2dtranspose layer?

I mean spliiting the con2dtranspose input and process it properly like this, not sure if its possible with conv2dtranspose layer.

i try your idea about split some not supported ops, such as maxpool2d.
these codes are replace by the identical codes.
the original code is:
p = tf.keras.layers.MaxPool2D(pool_size=(2, 2),strides=2,name=name+'_MaxP')(x)
the compile logs of the original model are
Operator                       Count      Status

MAX_POOL_2D                    2          More than one subgraph is not supported
MAX_POOL_2D                    2          Mapped to Edge TPU
CONCATENATION                  4          Mapped to Edge TPU
LOGISTIC                       1          Mapped to Edge TPU
QUANTIZE                       4          Mapped to Edge TPU
QUANTIZE                       2          More than one subgraph is not supported
TRANSPOSE_CONV                 3          Mapped to Edge TPU
TRANSPOSE_CONV                 1          More than one subgraph is not supported
CONV_2D                        19         Mapped to Edge TPU
Compilation child process completed within timeout period.
Compilation succeeded!

the tfltie model architecture of the original  model is

the identical codes are:
    x_UL = tf.keras.layers.Cropping2D(cropping=((0, r), (0, r)),name=name+'UpLeft')(x)
    x_UR = tf.keras.layers.Cropping2D(cropping=((0, r), (r, 0)),name=name+'UpRight')(x)
    x_DL = tf.keras.layers.Cropping2D(cropping=((r, 0), (0, r)),name=name+'DownLeft')(x)
    x_DR = tf.keras.layers.Cropping2D(cropping=((r, 0), (r, 0)),name=name+'DownRight')(x)
    p_UL = tf.keras.layers.MaxPool2D(pool_size=(2, 2),strides=2,name=name+'UL_MaxP')(x_UL)
    p_UR = tf.keras.layers.MaxPool2D(pool_size=(2, 2),strides=2,name=name+'UR_MaxP')(x_UR)
    p_DL = tf.keras.layers.MaxPool2D(pool_size=(2, 2),strides=2,name=name+'DL_MaxP')(x_DL)
    p_DR = tf.keras.layers.MaxPool2D(pool_size=(2, 2),strides=2,name=name+'DR_MaxP')(x_DR)
    p_Up   = tf.keras.layers.Concatenate(axis=-2,name=name+'ConcatUp')([p_UL, p_UR])
    p_Down = tf.keras.layers.Concatenate(axis=-2,name=name+'ConcatDown')([p_DL, p_DR])
    p      = tf.keras.layers.Concatenate(axis=-3,name=name+'ConcatWhole')([p_Up, p_Down])

the compile logs of the new model are:
Model compiled successfully in 57144 ms.

Input model: TFLite_unetTFLite_INT8_pixel416_Quantization_aware_training_UINT8_IN_OUT.tflite
Input size: 29.78MiB
Output model: TFLite_unetTFLite_INT8_pixel416_Quantization_aware_training_UINT8_IN_OUT_edgetpu.tflite
Output size: 37.20MiB
On-chip memory used for caching model parameters: 2.76MiB
On-chip memory remaining for caching model parameters: 58.25KiB
Off-chip memory used for streaming uncached model parameters: 26.91MiB
Number of Edge TPU subgraphs: 5
Total number of operations: 80
Operation log: TFLite_unetTFLite_INT8_pixel416_Quantization_aware_training_UINT8_IN_OUT_edgetpu.log

Model successfully compiled but not all operations are supported by the Edge TPU. A percentage of the model will instead run on the CPU, which is slower. If possible, consider updating your model to use only operations supported by the Edge TPU. For details, visit g.co/coral/model-reqs.
Number of operations that will run on Edge TPU: 64
Number of operations that will run on CPU: 16

Operator                       Count      Status

STRIDED_SLICE                  12         More than one subgraph is not supported
CONCATENATION                  1          More than one subgraph is not supported
CONCATENATION                  12         Mapped to Edge TPU
LOGISTIC                       1          Mapped to Edge TPU
MAX_POOL_2D                    13         Mapped to Edge TPU
QUANTIZE                       15         Mapped to Edge TPU
QUANTIZE                       3          More than one subgraph is not supported
TRANSPOSE_CONV                 4          Mapped to Edge TPU
CONV_2D                        19         Mapped to Edge TPU
Compilation child process completed within timeout period.
Compilation succeeded!

the architecture of the new tflite model is

GOOD NEWS is the conv2d and conv2dtranspose ops are all mapped to TPU.
BAD NEWS is the fps is not improved, the original model runs at 0.45 fps , the new model runs at 0.45 fps too...
i find that edgetpu support stridedslice op, but with some limitation
https://coral.ai/docs/edgetpu/models-intro/#quantization

Is there any another way to map the maxpool2d ops to tpu, by now, i can see the fact that as long as the maxpool2d ops are mapped to tpu, the conv2dtranspose ops can be mapped hence.
Thank you

UPDATE: I bravly replaced the maxpool2D op with conv2d(stride=2) op...and train another tens of hours and quantize again and failed again...
it is a sad story of one line words

ok, I am about to close this issue. Before that, can you give me any reason.
Is it about the cache or memory? or is there any constrain which prevent the maxpool2d op mapped to TPU?

ok, I am about to close this issue. Before that, can you give me any reason. Is it about the cache or memory? or is there any constrain which prevent the maxpool2d op mapped to TPU?

I think, Its due to the size of maxpool2d op as you are able to map it by reducing the input size.


doc-remove-include-attribute-file

removes the include statement for the attribute from the pages adoc files - can the include be added in a higher level file instead?

@cfchase for your review

I tested this locally and removing the include line made no difference - the build uses the values in the _attributes.adoc file :)

@cfchase @erwangranger please review when you can - thanks


Unable to replicate playground code in WebSocket server (INCOMPLETE error)

Hi,
I am building a very simple streaming XVIZ server. I think I have the simplest one, and thought it'd be good to start with the examples you see in playground. In general I really enjoy this workflow of trying something in the playground (really cool example!) and then putting it in my application.
Unfortunately, trying to run this WS server:
const fs = require('fs');
const WebSocket = require('ws');
const path = require('path');
const process = require('process');

const xviz = require('@xviz/builder');
const XVIZBuilder = xviz.XVIZBuilder;
const XVIZMetadataBuilder = xviz.XVIZMetadataBuilder;
const {deltaTimeMs} = require('./serve');

console.log("Simple XVIZ server");

// Connection State
class ConnectionContext {
    constructor(settings, metadata, allFrameData, loadFrameData) {
        this.onConnection.bind(this);
        this.onClose.bind(this);
        this.onMessage.bind(this);
    }

    log(msg) {
        console.log("CC", msg)
    }

    logMsgSent(send_time, index, real_index, tag, ts = 0) {
      const t_from_start_ms = deltaTimeMs(this.t_start_time);
      const t_msg_send_time_ms = deltaTimeMs(send_time);
      this.log(
        ` < Frame(${tag}) ts:${ts} ${index}:${real_index} in self: ${t_msg_send_time_ms}ms start: ${t_from_start_ms}ms`
      );
    }

    sendMetadata() {
      var xvizMetadataBuilder = new XVIZMetadataBuilder();

      // Exact copy of playground
      // metadata
      xvizMetadataBuilder
      .stream('/vehicle_pose')
      .category('pose')

      .stream('/object/tracking_point')
      .category('primitive')
      .type('circle')
      .coordinate('VEHICLE_RELATIVE')
      .streamStyle({
        fill_color: '#fb0'
      })

      .stream('/object/shape')
      .category('primitive')
      .type('polygon')
      .coordinate('VEHICLE_RELATIVE')
      .streamStyle({
        extruded: true
      })

      .startTime(1000)
      .endTime(1010);

      var metaData = JSON.stringify(xvizMetadataBuilder.getMetadata());
      console.log('--META--');
      console.log(metaData);

      this.ws.send(metaData, {compress: true});
      const frame_send_time = process.hrtime();
      this.logMsgSent(frame_send_time, 1, 1, 'metadata');
    }

    onConnection(ws) {
        this.log('> Connection from Client.');

        this.t_start_time = process.hrtime();
        this.ws = ws;

        // Respond to control messages from the browser
        ws.on('message', msg => this.onMessage(msg));

        // On connection send metadata
        this.sendMetadata();
    }

    onClose(event) {
      this.log(`> Connection Closed. Code: ${event.code} Reason: ${event.reason}`);
    }

    onMessage(message) {
      const msg = JSON.parse(message);

      this.log(`> Message ${msg.type} from Client`);
    }
}

function setupWebSocketHandling(wss) {
    // Setups initial connection state
    wss.on('connection', ws => {
        console.log("WSS on connection ... ")
        const context = new ConnectionContext();
        context.onConnection(ws);
    });

    console.log("Setup WebSocket handling");
}

// Try send some meta data
const wss = new WebSocket.Server({port: 8081});
setupWebSocketHandling(wss)

with the streetscape.gl get-started (yarn start-streaming) results in an "INCOMPLETE" error at the client-side. See screenshot below. Any ideas?

In fact, it looks like even the generated JSON in the playground is not valid? To make it valid I have to wrap the version in a "data" tag. So not
"type": 'xviz/metadata',
"version": "2.0.0",
"streams": { ... }

But rather:
"type": 'xviz/metadata',
  "data" :  {
    "version": "2.0.0",
  },
  "streams": { ... }

I also noticed the XVIZPlayground uses an XVIZWriter to turn the resulting metadata in a message. Do I need to do that? Is a simple JSON.stringify(xvizMetadataBuilder.getMetadata()) not sufficient?

Issue
When running over a web socket we put XVIZ data into an envelop object with just type and data fields. Where type is xviz/TYPE and data is the actual content returned by the builders.  This allows you to send application specific data on the web socket as well as XVIZ data.  You can read more about it here in the docs.
A concrete example is your metadata should look like:
{
    "type": "xviz/metadata",
    "data": {
        "version": "2.0.0"
    }
}

Solution
Make your send method look like this:
    var envelopedMsg = {
      type: 'xviz/metadata',
      data: xvizMetadataBuilder.getMetadata()
    };
    var metaData = JSON.stringify(envelopedMsg);

Then you'll see (I have to ctrl-c) the server
$ npx xviz dump -c ws://localhost:8081 logname
[CONNECTED]
[< START]
[> METADATA] version: 2.0.0
[< TRANSFORM_LOG] LOG-START - LOG-END (tid: f8b38a41-59fa-44b9-9311-cd612886bb37)
^CClosing
[CONNECTION CLOSED]

Server Dev Tip
I have found the best way to test a server is to use the command line client we have built.  You need to grab it from master:
# make sure you have yarn and node installed
git clone git@github.com:uber/xviz.git
cd xviz
./script/bootstrap.sh

Then you can test queries against your client:
$ npx xviz dump -c ws://localhost:8081 logname
[CONNECTED]
[< START]
Unknown message format { version: '2.0.0',
  streams:
   { '/vehicle_pose': { category: 'pose' },
     '/object/tracking_point':
...

Also @twojtasz is working on morphing our example code into a real server module.

Ah that's great advice and fixes my issue so far. Thanks for taking the extra effort in giving me some dev tips too.


Update README.md

Added an API that returns local time for a given location. For example America/Belém.

Hi @ZaunSupremoXV
Thanks for your contribution ;)
We have some problems with Public APIs, so we won't be able to review/add this improvement right now.
Read this issue for more information, please: https://github.com/public-apis/public-apis/issues/3104


[Windows] GDI resource leaks when using the software renderer code path

GDI resource (Device Context) leaks when using the software renderer code path.
This only happens when the app is using software rasterization, i.e., if the embedder explicitly specifies FlutterRendererType::kSoftware or AngleSurfaceManager::Create() somehow fails.
The leak happens in every frame, so after a while, number of leaks will soon reach the default per-process limit of GDI handles and then the app UI will not be responsive.

Hi @sevenstars, would it be possible for you to provide a complete minimal reproducible code sample as well as steps to reproduce?
Please also provide the output of flutter doctor -v.
Thank you

The leak can be reproduced when the app is using software rasterization on Windows, i.e., in one of scenarios as follows:

The embedder explicitly specifies kSoftware as the FlutterRendererType when calling embedder API FlutterEngineRun(), or
AngleSurfaceManager::Create() somehow fails

I've created a PR to fix this: https://github.com/flutter/engine/pull/34574

Hi @sevenstars, I'm not familiar with the scenarios you described above.
Can you provide a small sample app that has any of the scenarios described above?

The leak can be reproduced with any flutter app using the software fallback path. The flutter engine will try to use hardware accelerated rendering if possible, and I found AngleSurfaceManager::Create() somehow fails on some Windows 7 machines, so in this case the flutter engine will use the software fallback path.
You can reproduce the leak on any Windows 10 machine, using the following steps:

Use the DirectX Control Panel (DXCpl.exe) to apply Direct3D debug settings for the flutter app.
Run the image_list example app.
Use the GDIView tool to see the resource leaks.

The result:
After running the app for a few minutes, you will see the number of leaks reaches 10000, and the app will stop updating.
Use the DirectX Control Panel (DXCpl.exe) to apply Direct3D debug settings for the flutter app

Run the image_list example app

Use the GDIView tool to see the resource leaks

cc @danagbemava-nc

I was able to repro this by forcing the software renderer config using this patch on my local engine:
diff --git a/shell/platform/windows/flutter_windows_engine.cc b/shell/platform/windows/flutter_windows_engine.cc
index ceb4634d43..c0065a6a78 100644
--- a/shell/platform/windows/flutter_windows_engine.cc
+++ b/shell/platform/windows/flutter_windows_engine.cc
@@ -305,9 +305,12 @@ bool FlutterWindowsEngine::RunWithEntrypoint(const char* entrypoint) {
     args.custom_dart_entrypoint = entrypoint;
   }

-  FlutterRendererConfig renderer_config = surface_manager_
-                                              ? GetOpenGLRendererConfig()
-                                              : GetSoftwareRendererConfig();
+  // FlutterRendererConfig renderer_config = surface_manager_
+  //                                             ? GetOpenGLRendererConfig()
+  //                                             : GetSoftwareRendererConfig();
+
+
+  FlutterRendererConfig renderer_config = GetSoftwareRendererConfig();

   auto result = embedder_api_.Run(FLUTTER_ENGINE_VERSION, &renderer_config,
                                   &args, this, &engine_);


feat: process frames on onNewFrame

@ueman this is related to another comment you mentioned about processing frames on the way, instead of doing it at the end. What do you think? Is what you had in mind?
Still GIF is blocking UI, but if anyone wants to export the list of frames will not freeze.

@ueman this is related to another comment you mentioned about processing frames on the way, instead of doing it at the end. What do you think? Is what you had in mind?
Still GIF is blocking UI, but if anyone wants to export the list of frames will not freeze.

No, I was thinking something along the lines of https://github.com/ueman/screenrecorder/pull/21

@ueman this is related to another comment you mentioned about processing frames on the way, instead of doing it at the end. What do you think? Is what you had in mind?
Still GIF is blocking UI, but if anyone wants to export the list of frames will not freeze.

No, I was thinking something along the lines of #21

@ueman this is related to another comment you mentioned about processing frames on the way, instead of doing it at the end. What do you think? Is what you had in mind?
Still GIF is blocking UI, but if anyone wants to export the list of frames will not freeze.

No, I was thinking something along the lines of #21

I just left a comment there ;) Thanks!


Incorporate Ingress deployment in test.

Now that there are instructions for deploying to IBM Cloud using Ingress instead of LoadBalancers, we need to develop a test case to validate this is successful during every PR.

The CD Toolchain does 3 clinical ingestion deployments (smoke, fvt, and ivt).   All deployments use the (very reliable) ingress method. - Closing


[release-0.30] [tests] Wait for config changes to be propagated and reset them implicitly

This is a cherry-pick of #3542
NONE

/cc @ashleyschuett
/cc @jean-edouard

This seems to bring bits of #3766, probably better to wait until that's merged.

:+1:

/retest

/retest

/hold Need to dig into test results. It looks like some things may not be right.

/hold

/hold cancel
Should be better now. One config entry had the wrong format.

/approve

/retest

/lgtm


Please provide your Stack

Hello ! as part of the pre-hackfest checklist, we asked you to describe the stack of software that you will be using in your project.
We want you to do this with StackShare. Please create a new stack and let us know the url of your stack. Only one per project.

Hi @lordmila  Can you let us know the link to your stack on stackshare please ?
Thanks !
Bruce

Hello - can you please describe the stack tools that you're using ?  See the original description

Thanks - are you working on the ACEPRD project ? because we already have a stack for that http://stackshare.io/Davazano/aceprd-plant-repository
if not, please let me know which project you're assigned to,

I'm working on IBIS, Thanks
On Tue, Nov 29, 2016 at 12:34 PM, Bruce Becker<EMAIL_ADDRESS>wrote:

Thanks - are you working on the ACEPRD project ? because we already have a
stack for that http://stackshare.io/Davazano/aceprd-plant-repository
if not, please let me know which project you're assigned to,
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/sci-gaia/LagosHackfest/issues/21#issuecomment-263547646,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AEWFzJdsAxUbb1MHQzXZAQY2J7Dc2Jqgks5rDA3RgaJpZM4K6duE
.


Use ReactDOM.unstable_batchedUpdates in useRouterHistory?

From https://github.com/rackt/redux-simple-router/issues/197.
This issue arises when using a Flux integration for React Router. The issue is that, if the integration updates e.g. Flux stores when history updates, this will lead to a separate setState (in e.g. smart component containers, from the store update) from the setState in <Router> (from the transition manager update directly), which will lead to the page rendering twice.
We could in principle resolve this by using ReactDOM.unstable_batchedUpdates in useRouterHistory. We can't really do this in history because that library is not aware of React. I think it'd make more sense to do it here rather than in every React Router integration, because otherwise they'd all need the same logic.
The downsides of course are:

We now call into an unstable API
We introduce an explicit react-dom dependency (for now) when currently there isn't one

cc @gaearon, in case this is a horrible anti-pattern if used in conjunction with Redux

Until it's sanctioned, I would avoid using these kinds of APIs. React already does batching internally and I believe improvements to negate the need for these kinds of extra APIs are coming. The side effects of using them might be pretty negative.
Also, I'm getting $scope.apply angular flashbacks :P

React only does batching right now inside React lifecycle hooks. setState calls outside of those aren't batched, which is what was causing the reported RSR issue.

Yeah, sorry, I should have said "does batching to a certain extent".
But I'm wondering if this is something we should be concerning ourselves with. Who is connecting location state and for what reason? The router already provides that for you. So, you're getting the same information in two different ways. It's no wonder that you're getting rendered twice.
The state that redux-simple-router provides is primarily useful outside of your components. Such as in action creators or middleware. So this shouldn't be a common problem. It's mainly a documentation of best practices by the binding libraries.

Is Redux connect smart enough to only re-render when a specific portion of the store has changed? At a glance, it looks like it re-renders whenever anything in the store changes.

It has a shouldComponentUpdate check that does a shallow compare of the props. So it will only render when whatever it has selected changes.

I see https://github.com/rackt/react-redux/blob/master/src/components/connect.js#L169-L181 and https://github.com/rackt/react-redux/blob/master/src/components/connect.js#L78-L80. Won't this always set hasStoreStateChanged to true after a store update?

Ah, shit, I think you're right. It must be up to you to provide your own shouldComponentUpdate. I never did a deep dive on react-redux, I just normally focus on the main module.

Or use reselect or something.
But if we make React batch the updates in the history callback, then we avoid this issue.

We might have been the first project outside of facebook to use context, so we're not afraid of unstable API (it's projects like ours that often justify them).
At the least, it could be an opt-in option to Router.
That said, I'd rather have a different solution. Is there a decent workaround?

I don't think this should be an opt-in (or even opt-out) feature. It ought not break anyone or meaningfully change behavior except for preventing the double-render thing – it'd purely be an implementation detail on our side.
The issue is basically:

history fires listener
Flux integration picks up on update, updates stores, leads to subscribed containers calling setState and re-rendering
<Router> picks up on update, calls setState, re-renders

Unless I'm misunderstanding, this issue is most prominent with Redux, since there's only a single store, so it causes every container to re-render.
It's really a question of whether we're okay with calling into an unstable ReactDOM API and taking an explicit react-dom dependency. You can see from e.g. https://github.com/facebook/relay/pull/713 that the RN equivalent is actually a separate ReactNative.unstable_batchedUpdates (although we don't meaningfully support RN yet, so this isn't going to break anyone in practice).
You can see in the Relay case that unstable_batchedUpdates is used there for much the same purpose.

I still kind of expect a redux router integration that uses RouterContext and sets up its own history listener and dispatches when locations come through.

That's what redux-simple-router does. However, there are two listeners, and therefore two setState/renders.

You'd actually have to do with redux-router does, which is to replace <Router> entirely and have everything be driven by the store state rather than the router state. It's a pretty different approach to RSR, I think.

Just tested it – it doesn't actually help.
Better probably to wait for React to update context propagation such that people no longer need to use { pure: false } for their connected components.

@ryanflorence @taion I actually tried using the RouterContext during an attempt to simplify/upgrade redux-router to ReactRouter v2.
https://github.com/mjrussell/redux-router/blob/rr-v2/src/ReduxRouterContext.js
This approach felt more like react-router was the single point of truth for the routing data and the store.router more of just a mirror of that data. The problem I found was that it became very difficult to update the routingReducer and expect it to fire off a change to React-Router without retriggering another dispatch.
Once I saw RSR had the full location data I hopped on that bandwagon though :smile:

Is Redux connect smart enough to only re-render when a specific portion of the store has changed? At a glance, it looks like it re-renders whenever anything in the store changes.

No, it does not re-render everything, that would have a terrible performance. React Redux has a bunch of performance optimizations, from implementing shouldComponentUpdate(), to calling mapStateToProps and mapDispatchToProps only when necessary, to caching render()ed element (which has the same effect as shouldComponentUpdate() but allows us to delay the child prop calculation until render() to guarantee there are no stale props when you nest containers).
Some perf optimizations in React Redux:

https://github.com/rackt/react-redux/blob/4fca3cbc736b7462de65f589d3b0fdab0cb7a495/src/components/connect.js#L78-L80
https://github.com/rackt/react-redux/blob/4fca3cbc736b7462de65f589d3b0fdab0cb7a495/src/components/connect.js#L101-L103
https://github.com/rackt/react-redux/blob/4fca3cbc736b7462de65f589d3b0fdab0cb7a495/src/components/connect.js#L111-L113
https://github.com/rackt/react-redux/blob/4fca3cbc736b7462de65f589d3b0fdab0cb7a495/src/components/connect.js#L150-L152
https://github.com/rackt/react-redux/blob/4fca3cbc736b7462de65f589d3b0fdab0cb7a495/src/components/connect.js#L204-L210
https://github.com/rackt/react-redux/blob/4fca3cbc736b7462de65f589d3b0fdab0cb7a495/src/components/connect.js#L214-L219
https://github.com/rackt/react-redux/blob/4fca3cbc736b7462de65f589d3b0fdab0cb7a495/src/components/connect.js#L228-L234

Some tests proving they work as intended:

https://github.com/rackt/react-redux/blob/4fca3cbc736b7462de65f589d3b0fdab0cb7a495/test/components/connect.spec.js#L462-L756
https://github.com/rackt/react-redux/blob/4fca3cbc736b7462de65f589d3b0fdab0cb7a495/test/components/connect.spec.js#L862-L983
https://github.com/rackt/react-redux/blob/4fca3cbc736b7462de65f589d3b0fdab0cb7a495/test/components/connect.spec.js#L1411-L1507

Won't this always set hasStoreStateChanged to true after a store update?

To clarify—this is correct but we're using a different technique to avoid rendering. We memoize the return value of previous render(). If we return the same element, React will bail out of reconciliation so it's equivalent to us implementing shouldComponentUpdate() but gives us the ability to delay calling map*ToProps() until the actual rendering so we invoke those functions with the same props we are rendering with.

@gaearon To clarify, I'm talking about the case with { pure: false }, due to https://github.com/rackt/react-router/issues/470. I believe most of the render-related optimizations then get disabled, including the SCU check and the memoization in render.

Oh, I see. This is correct, with { pure: false } we don't enable any optimizations at all.

Well, we can't fix it just by using batched updates  anyway. And mostly people can get by with pure Redux containers anyway.

This only applies if you map location to props in redux-simple-router (a bad pattern, the router already provides this to your components) or if you have pure set to false (fairly uncommon). I think most commonly people are running into the first case and that's more an issue of our documentation.

@timdorr You need to set pure to false for context updates for e.g. isActive to propagate through to update link active status.


release: v1.0.4

Note that the failure on the CI happens arbitrarily (there's an issue for that). It is not reproducible locally, so it is something related to concurrency/update 😞 Should be fixed at some point tho... but it does not seem to be propagated up the chain.


Option to Hide Right Click Contextual Menu

System Information:

Version: 1.5.3
Language: en-US
Timezone Offset: +08:00
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.122 Safari/537.36

What steps will reproduce the problem?

Highlight a text
Right click
Contextual Menu Item

What is the expected result?
Option to hide it as not everyone enters calendar events like this or requires the contextual menu to be there every time they highlight a text. It just adds clutter and a option to remove it would be most appreciated.
What happens instead?
You can see the right click contextual menu regardless whether you need it or not.
Screenshot URL:
https://lh3.googleusercontent.com/-5mqR0CD6KeI/VG75LdjAgsI/AAAAAAAAo8o/D71Tz6lUrio/w272-h207-no/Screen%2BShot%2B2014-11-21%2Bat%2B16.34.04.png
Logs:

I also want this. It is really bothersome that i cant get rid of it. In firefox there were addons to remove these but in chrome there is just no way..

You just don't want to have the option to add to the calendar the highlighted text when you right click something like this ? Or did I understand it wrong ?

Yeah, that's what I am hoping for. I would be grateful if you added an option to disable this.
Chrome still doesn't have option to remove them so when you have many extensions, it gets bothersome quite quickly. I uninstalled this extension for this reason and simply use pinned tab for the calendar :/


Fix comments on PR#327

https://github.com/SELab-2/Dr-Trottoir-4/pull/327

This has long been fixed #435 .


Hope to get your reply, thank you

The library updates the pose of the a-entity with mindar-face-target continuosly. It is a 3D coordinate relative to the scene though.  There is no 2D coordinates relative to the screen.


auto-close-reconcile if user actually reconciled

Forum Link (if applicable): https://forum.youneedabudget.com/discussion/54572/reconciliation-issue#latest
Explanation of Bugfix/Feature/Enhancement:
We weren't taking into account whether or not the user had reconciled already or not, now we always run if the modal appears and check if the modal has the final reconcile state class on it.
Recommended Release Notes:

Fixed an issue where the reconcile modal would close before you could enter information after clicking "No."

@blargity it looks like this didn't make it into master....maybe got overwritten by another merge?

Looks like it was lost when refactoring the feature to be saucy!

Random! I'll resauce the sauce tonight.


How to turn cube into spherical entangle shape.

Transforming a cube into a spherical entangled shape involves a deformation or morphing process.


Paper updates

Documentation Update
Change Description

I added a Japanese template_jp.md. @chack411 I machine-translated the template from English to Japanese so please check it.
I updated the guidance to include the option of writing in Japanese and translating to English.

Checklist

[X ] I have read the code of conduct and the documentation guidelines
[X ] My documentation follows the project's writing style and standards
[X ] My documentation is accurate, clear, and complete
[X ] I have checked the links and references, and they are working correctly
[X ] I have tested the updated documentation and verified that it is helpful and informative

My intent here was to have everyone share something. The paper was the starting point. But I also agree it feels like a lot for some who is not a speaker or made contributions like this in the past.
I think its still important to have something to contribute (via a PR) as the registration process, even if the person is not going to present. Could we write the CFP in a way that is not just for a "session".
Perhaps someone could describe how they've contributed to open source. Short and just link to the PR in another repo. Or maybe the could describe how they would contribute to the ShoCode Summit event. For example "I'll help with registration".
What ideas do you have? I'll rework the "paper" template and make it less of a burden, but keep the intent of "contribution by every person".  We'll rename it to Call for Proposal.


Unable to load css

Hi,
Can you give the webpack configuration to use css-loaders?
I tried a lot of things from the internet, nothing worked.
Thanks

Are you just looking for plain CSS or SASS as well?

Just extract your css to build/static folder and include the link to the extracted css file the same way the js files are referenced in server.js. Remove aphrodite, etc.

@rowellx68 yes I am trying to use extensions which use CSS and SASS.
@jaredpalmer I ll try that. But an example would be helpful. I tried to use css-loader , sass loader and give the directory in "includes" of the webpack config. Doesnt help

@shoebmogal Here's how I've done it.
I installed the following packages:

extract-text-webpack-plugin
css-loader
sass-loader
style-loader

Here's an example of my webpack.config.dev.js
https://gist.github.com/rowellx68/362ceaeedf09c83c2b9c
You should then add this line in the server.js
<link rel="stylesheet" href="${ isDeveloping ? '/build/static/main.css' : assets.main.css}">
Then in the App component
if (typeof window !== 'undefined') {
  require('../css/core.scss');
  require('../css/theme.scss');
}

We need the code above so we don't get a syntax error when we start the server.

I ll give it a try @rowellx68 ! Thanks for all the help, will respond with my results and close thid issue.

Hi @rowellx68 , I tried doing all of that didnt work :(
Here's the error:
/Users/../react-production-starter/node_modules/flexboxgrid/dist/flexboxgrid.css:1
(function (exports, require, module, __filename, __dirname) { .container-fluid,
^
SyntaxError: Unexpected token .
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:404:25)
at Module._extensions..js (module.js:432:10)
at Object.require.extensions.(anonymous function) [as .js] (.../react-production-starter/node_modules/babel-register/lib/node.js:134:7)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:313:12)
at Module.require (module.js:366:17)
at require (module.js:385:17)
at Object. (..../react-production-starter/node_modules/react-flexbox-grid/lib/components/Grid.js:13:20)
at Module._compile (module.js:425:26)

The issue seems to stem from you requiring flexboxgrid directly inside Grid.js. After trying it out myself, what you could do is @import flexboxgrid in your own css instead.
I have this in my webpack.config
resolve: {
    modulesDirectories: [ 'node_modules' ]
}

More info about resolve.moduleDirectories --> here

Then inside my own css file  I just imported it as below:
@import "~flexboxgrid/dist/flexboxgrid";

And here's the module loader for my css and scss
{
    test: /\.(s?css)$/,
    loader: ExtractTextPlugin.extract("style-loader", "css-loader!sass-loader")
}

Of course you will require the correct loaders and plugin for it to work. :smile:

Thanks for the response @rowellx68 but its an external module that I am importing.
Infact any model that has css in it is failing with similar error.

@shoebmogal You'll need style-loader and css-loader to support plain css, even in external modules.

I am closing this issue and opening a PR for a recipes folder.

@shoebmogal do you solved your problem ?
I've same problem . And I do not know what is the solution ?
@shoebmogal @rowellx68  I opened a issue(532) about this. Thanks if you know the solution and answer that.


Support for database diagram using nomnoml

Personally I think https://github.com/skanaar/nomnoml diagrams are better and it's a npm package.
Any interest in this for sqlectron?

I don't know, the one we are currently using seems to have a better support and more features. We could though an option to export to nomnoml too if that is really useful.


Setup for proposal status page

The PR for the gh-pages branch should be merged at roughly the same time as this one. (I haven't created that PR yet, because there is currently no gh-pages branch. Someone will need to create it.)

New source of truth for proposal summary and status: proposals.xml
Status page rendering: proposal-status.xsl

My branch https://github.com/jtbandes/swift-evolution/tree/gh-pages-new should be pushed to gh-pages in this repo.
git remote add jtbandes git@github.com:jtbandes/swift-evolution.git
git fetch jtbandes
git push origin jtbandes/gh-pages-new:gh-pages

cc @DougGregor @lattner

I'll keep rebasing this as master changes, but naturally the sooner it's merged the less pain there'll be for all of us 😉


Additional updates to triggers needed for collection removal.

Checklist:

[X] Read the Code of Conduct and Contributing Guidelines.
[X] Followed the commit message guidelines.

Updates to the collections
This contains additional updates needed for collection removal to fix issues found during testing.
Related Issues:
None.

@hibell As the collection hub is going away and it is being produced in 0.6.0 as an Appsody stack hub, are the triggers still needed?
I would presume that they will end up like the pipelines in that they will be in a separate repository and have a separate release. Is this the case?


Adding Popularity Slider

Hi brianch
First of all thank you for this great project and your efforts at developing it.
The csv contains a field popularity. Have you considered adding a slider for this?

Hello! And thanks :)
My first thought was to have a low minimum value (just to exclude things that were mostly down-voted in lichess) in the config file (so it's changeable, but not exposed in the UI), since it's not something I imagine that people would tweak much. But yeah, it could also be added as a slider.
I guess I should take a look at the distribution of values to have an idea how it looks, so there's more info to make a decision.

I was just thinking of setting popularity=0.99 for example to get only the best of the best;) But yeah config files makes sense I think as this is probably a niche-request

Ok, might as well add it as a slider indeed, there's a considerable amount of variation, mostly around the 20 to 100 popularity. (Popularity goes from -100 to 100)
The most popular ones are also the most played, perhaps because lichess recommends them more.
Disclaimer: I don't understand anything about statistics 😅

By the way, with this I also found out that apparently there's a few puzzles with more than 3000 rating now, last time I checked there were none, I will adjust the slider in the next release.

Implemented in a74d26904f04f5c264f1b4ed387c9eff961e8433


Simple project of rotate

Hi!
Can I give you a simple example of a project associated with the rotation of the screen?
I tried the following:
    query2.subscribeOn(Schedulers.newThread())
            .observeOn(AndroidSchedulers.mainThread())
            .compose(RetainFactory.bindToRetain(getFragmentManager())) //binding here
            .subscribe(new Subscriber<String>() {
                @Override
                public void onCompleted() {
                    showLog("=== END ===");
                }

                @Override
                public void onError(Throwable throwable) {
                    showLog("ERR: " + throwable.getMessage());
                }

                @Override
                public void onNext(String arg0) {
                    txt.setText(arg0);
                    progressBar.setProgress(i);
                    ++i;
                }
            });

But when you compile an error.
Can your simple example?

Unfortunately compose and screen rotation are incompatible.
Use RetainFactory.create() method. See readme.

Ok. Almost all happened.
And where you onError interface?

and onFinish()?

see RetainWrapper#subscribe() methods.

Ok!
Ty!


New version: StringDistances v0.5.1

Registering package: StringDistances
Repository: https://github.com/matthieugomez/StringDistances.jl
Created by: @matthieugomez
Version: v0.5.1
Commit: ece1a0ea83225abeabd7e1435439093ea37c7b4c
Reviewed by: @matthieugomez
Reference: https://github.com/matthieugomez/StringDistances.jl/commit/ece1a0ea83225abeabd7e1435439093ea37c7b4c#commitcomment-36401072

Please close


Improve translations on TLS error message

Questions
Answers

Description?
Modify French strings to not wrongfully blame cURL in all situations. Does not include additional ways to check to be more precise in the error messageStop always blaming cURL when unexpected http code are received when testing TLS version in French

Type?
improvement

BC breaks?
no

Deprecations?
no

Fixed ticket?
Partially Fixes #173.

How to test?
Forcibly make tls test file return a 404 and check error returned in french in the back office paypal module config

This issue did not move since a long time.
And this part have been improved on 6.0.0 and we will make new evolutions to have better error messages
in the future.
Thank you for this suggestion.


Implement de-serializers with defaults

Relates to SAP/cloud-sdk-backlog#399.
This introduces de-serializers and default de-serializers as a basis for customizable de-serializers according to this ADR.

Just out of curiosity. What is our startegy to make the serializer changeble at runtime by the user? Which pattern will we use?

Just out of curiosity. What is our startegy to make the serializer changeble at runtime by the user? Which pattern will we use?

The ADR shows one example, which is a builder pattern with default serializer.

Just out of curiosity. What is our startegy to make the serializer changeble at runtime by the user? Which pattern will we use?

polomorphism?
funcitonal dispatching?
generics?

generics, especially because it is supposed to be dynamic.

Closing, as replaced by #1842.


.carto export of multi-geometry table takes only one geometry

It looks it takes just first geometry, so after exporting this map I get only Points for one of the tables (table_3625612593), which should have a lot of polygons as main element: https://cartomobile-team.cartodb.com/u/nutiteq/viz/597dc568-1bf7-11e6-af41-0ecd1babdde5/map
@juanignaciosl @rafatower

Actually cartodbfy'ed tables are meant to have just one column the_geom with just one geometry type (just points, lines or polygons, but not points and polygons). The fact that you got imported multiple geometry types is indeed a bug.

we allow to have multiple geometry types in a cartodbfied table if you do a query like update table set the_geom = 'POLYGON....' where cartodb_id < 10
So I think this something we'd need to fix


rendering image differs from the input one

Hi
Thanks for releasing this repo.
I tried to  do the inference to get the different degrees of viewpoints(celeba) by using the the output of netview and texture, followed by forward_step1 function, but the issue is that the generated image differs from the input one. Do I need to do the preprocessing for input image, such as specified alignment  or the code I use needs to be modified? please provide some suggestions to help me to fix it.  Thanks in advance
import torch
from gan2shape import networks
from torchvision import transforms
from PIL import Image
from gan2shape.renderer.renderer_infer import Renderer
from torchvision.utils import save_image
import math
import torch.nn as nn
import torch.nn.functional as F
from dlib_align import align
import cv2

torch.manual_seed(0)
pretrain_pth_path = "/workspace/GAN2Shape/checkpoints/gan2shape/celeba_pretrain.pth"
image_path = "/workspace/GAN2Shape/data/celeba/000000.png"
image_name = image_path.split("/")[-1]
image_size = 128
ckpt = torch.load(pretrain_pth_path, map_location="cpu")
max_depth = 1.1
min_depth = 0.9
gn_base = 8 if image_size >= 128 else 16
nf = max(4096 // image_size, 16)
flip1 = [False, True, True, True]
flip3 = [True, True, True, True]
mode = 'step3'
depth_rescaler = lambda d: (1+d)/2 *max_depth + (1-d)/2 *min_depth
add_mean_V = True
xyz_rotation_range =60
xy_translation_range = 0.1
z_translation_range = 0
add_mean_L = True
use_mask = False
border_depth = (0.7*max_depth + 0.3*min_depth)

def init_VL_sampler():
        from torch.distributions.multivariate_normal import MultivariateNormal as MVN
        view_mvn_path = 'checkpoints/view_light/celeba_view_mvn.pth'
        light_mvn_path = 'checkpoints/view_light/celeba_light_mvn.pth'
        view_mvn = torch.load(view_mvn_path)
        light_mvn = torch.load(light_mvn_path)
        return view_mvn['mean'].cuda(),light_mvn['mean'].cuda(),MVN(view_mvn['mean'].cuda(), view_mvn['cov'].cuda()),MVN(light_mvn['mean'].cuda(), light_mvn['cov'].cuda())

netDepth = networks.EDDeconv(cin=3, cout=1, size=image_size, nf=nf, gn_base=gn_base, zdim=256, activation=None)
netDepth.load_state_dict(ckpt["netD"])
netDepth.cuda()
netDepth.eval()
netalbedo = networks.EDDeconv(cin=3, cout=3, size=image_size, nf=nf, gn_base=gn_base, zdim=256)
netalbedo.load_state_dict(ckpt["netA"])
netalbedo.cuda()
netalbedo.eval()
netView = networks.Encoder(cin=3, cout=6, size=image_size, nf=nf)
netView.load_state_dict(ckpt["netV"])
netView.cuda()
netView.eval()
netLight = networks.Encoder(cin=3, cout=4, size=image_size, nf=nf)
netLight.load_state_dict(ckpt["netL"])
netLight.cuda()
netLight.eval()
# renderer = renderer_infer
renderer = Renderer()
view_mean,light_mean,view_mvn,light_mvn = init_VL_sampler()

transform = transforms.Compose(
            [
                transforms.Resize(image_size),
                transforms.ToTensor(),
            ]
        )
image = Image.open(image_path)
image = transform(image).unsqueeze(0).cuda()
image = image * 2 - 1
image.cuda()

b = 1
h, w = image_size, image_size
## predict depth
depth_raw = netDepth(image).squeeze(1)  # 1xHxW
depth = depth_raw - depth_raw.view(1,-1).mean(1).view(1,1,1)
depth = depth.tanh()
depth = depth_rescaler(depth)
depth_border = torch.zeros(1,h,w-4).cuda()
depth_border = nn.functional.pad(depth_border, (2,2), mode='constant', value=1.02)
depth = depth*(1-depth_border) + depth_border *border_depth
if (flip3 and mode == 'step3') or flip1:
        depth = torch.cat([depth, depth.flip(2)], 0)

## predict viewpoint transformation
view = netView(image)
if add_mean_V:
    view = view + view_mean.unsqueeze(0)

view_trans = torch.cat([
    view[:,:3] *math.pi/180 * xyz_rotation_range,
    view[:,3:5] * xy_translation_range,
    view[:,5:] *z_translation_range], 1)

if flip3 and mode == 'step3':
    view_trans = view.repeat(2,1)
renderer.set_transform_matrices(view_trans)

## predict albedo
albedo = netalbedo(image)  # 1x3xHxW
if (flip3 and mode == 'step3') or flip1:
    albedo = torch.cat([albedo, albedo.flip(3)], 0)  # flip

## predict lighting
light = netLight(image)  # Bx4
if add_mean_L:
   light = light + light_mean.unsqueeze(0)
if (flip3 and mode == 'step3') or flip1:
   light = light.repeat(2,1)  # Bx4
light_a = light[:,:1] /2+0.5  # ambience term
light_b = light[:,1:2] /2+0.5  # diffuse term
light_dxy = light[:,2:]
light_d = torch.cat([light_dxy, torch.ones(light.size(0),1).cuda()], 1)
light_d = light_d / ((light_d**2).sum(1, keepdim=True))**0.5  # diffuse light direction

## shading
normal = renderer.get_normal_from_depth(depth)
diffuse_shading = (normal * light_d.view(-1,1,1,3)).sum(3).clamp(min=0).unsqueeze(1)
shading = light_a.view(-1,1,1,1) + light_b.view(-1,1,1,1)*diffuse_shading
texture = (albedo/2+0.5) * shading *2-1

recon_depth = renderer.warp_canon_depth(depth)
recon_normal = renderer.get_normal_from_depth(recon_depth)
save_image(recon_depth, f'./recon_depth.png')

grid_2d_from_canon = renderer.get_inv_warped_2d_grid(recon_depth)
margin = (max_depth - min_depth) /2
recon_im_mask = (recon_depth < max_depth+margin).float()  # invalid border pixels have been clamped at max_depth+margin
if (flip3 and mode == 'step3') or flip1:
        recon_im_mask = recon_im_mask[:b] * recon_im_mask[b:]
        recon_im_mask = recon_im_mask.repeat(2,1,1)
recon_im_mask = recon_im_mask.unsqueeze(1).detach()
recon_im = nn.functional.grid_sample(texture, grid_2d_from_canon, mode='bilinear').clamp(min=-1, max=1)
print("recon_im:",recon_im.shape)
save_image(recon_im[0], f'./recon_img.png', nrow=1)
save_image(recon_im[1], f'./recon_img1.png', nrow=1)
with torch.no_grad():
    _depth, _texture, _view = depth[0,None], texture[0,None], view_trans[0,None]
    num_p, num_y = 5, 9  # number of pitch and yaw angles to sample
    max_y = 70
    maxr = [20, max_y]
    # sample viewpoints
    im_rotate = renderer.render_view(_texture, _depth, maxr=maxr, nsample=[num_p,num_y])[0]
    im_rotate = im_rotate/2+0.5
    for i in range(im_rotate.size(0)):
                    save_image(im_rotate[i,None], f'./{image_name}_im_rotate_stage3_{i:03}.png', nrow=1)

@jackytu256
(1) The save_image function would revise recon_depth, which would cause problem, so you may use save_image(recon_depth.clone(), f'./recon_depth.png')
(2) You should use view_trans = view_trans.repeat(2,1) instead of view_trans = view.repeat(2,1).
(3) You should normalize recon_im before saving it, e.g.: save_image(recon_im[0]/2+0.5, f'./recon_img.png', nrow=1)
I believe these revisions should solve the problem.

@XingangPan
thanks for your reply.
(1) the save_image function I use is torchvision.utils(just for your reference).
(2) done
(3) done
seems that the problem still remains. Do I need to provide extra information for you?
really appreciate your help :)
Thanks

@jackytu256 I have run your code and it works well with the revisions. How is your result wrong? Could you provide an example?
Here are my results:
Input:

Results:

here is the example.
I reckon unseen images may occur this problem(got from ffhq) ?
please let me know if I need to provide more information. Thanks

@jackytu256 I see. This is not a bug. I think there are two main reasons.
(1) Note that the pre-trained model is not to predict accurate results for unseen samples, but to provide a rough initialization (as it is pre-trained on only 200 images). You still need to run instance-specific training as in scripts/run_celeba.sh.
(2) There is a domain gap between FFHQ (testing) and CelebA (training). Faces are aligned differently for the two datasets. I think the issue would be alleviated if you test with CelebA images cropped via https://github.com/elliottwu/unsup3d/tree/master/data.

thanks @jackytu256

thanks @XingangPan

Hey, were you able to find good results?


What is the effect of using no augmentation instead of weak augmentation for teacher?

Hi,
Just wonder if it is ok to have no data augmentation for teacher model (instead of weak augmentation)?
Thanks!

Well, I guess very weak data augmentation like random flip is used as regularization and is essential for the generalization of model, theoretically. Maybe mAP will drop a little, you could try this as a practice. Actually, I don't think this setting change makes much sense for this situation.

Thanks, Jack!
So I thought the reason why we have different augmentation for teacher and
student is to do some kind of consistency matching? If so,  I was wondering
why we can't do all the augmentation in the student. And leave teacher
alone, which is used for generating labels, and is like a eval/inference
job. And for eval jobs, we don't necessarily need data augmentation, I
think?
On Wed, Dec 29, 2021, 5:56 AM Jack Hu @.***> wrote:

Well, I guess very weak data augmentation like random flip is used as
regularization and is essential for the generalization of model,
theoretically. Maybe mAP will drop a little, you could try this as a
practice. Actually, I don't think this setting change makes much sense for
this situation.
—
Reply to this email directly, view it on GitHub
https://github.com/microsoft/SoftTeacher/issues/135#issuecomment-1002606164,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABISA2DH2KYE4L42BY4FQB3UTMHP7ANCNFSM5K5MUBUQ
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you authored the thread.Message ID:
@.***>

Just like augment test, when testing, weak augment improves mAP. Same reason here, weak augment improves the quality of psuedo labels, I guess.

Like, here. https://machinelearningmastery.com/how-to-use-test-time-augmentation-to-improve-model-performance-for-image-classification/


User view error

This is the error I mentioned I get when trying to view my profile and rights

I also get this error when I click Edit user in the Super Admin area. Moving this back @vyruss

@jollopre can you please look at c7bca5f87b0974f7ca6599ba81d81b499f62711a , 183c315359e4e372b527e2f02b00e9426b8f95ae ?

done! Ready for PR

Working as expected. Closing out.


Changing OpenAI API key broke bot, even after updating .env

I had to swap out my OpenAI API key for the bot, and even after updating the .env file, the program seems to be trying to use the old API key.

Hey @JT-III - where are you running the code? Wherever it is, you'll need to update the .env in that place, and you'll also need to restart the app

@JT-III were you able to get the code working or any further detail you can provide?


feat: Add .cjs, .mjs, .ts, .tsx, .jsx to default extensions

Fixes #1103

I don't want to pull TypeScript into the devDependencies so I'm not sure if this is going to get testing.  Maybe we could put regular JS into files of these extensions?
The fact that extension was missing from the nyc report command is minor - only effected the nyc report --help output.  Now that the default is non-empty it will matter.  I'd like to look into creating groups of flags - for example a shared function which adds all flags that apply to test-exclude.  That is not part of this.

Coverage remained the same at 96.87% when pulling 86d46e9cafbf563dfd899cfb5023756668dfe570 on coreyfarrell:extension-list into fe3311bd4770726c67e6eee1e39b15a3b616457b on istanbuljs:master.


nukies get spontanously frozen?

Description

Sometimes nuclear operatives might just suddenly freeze up for no discernable reason and be incapable of moving
Reproduction

Unsure, was not the victim of the bug, but a third party. All I know is that it involved a moth-person player with jug armor, that was found near a empty docking port on Nukie World
Screenshots

Additional context

It was resolved by shoving em in a chair, but we only figured that out because another player on the team had faced the issue before.

dupe of other issue and i reprod