5656final class EagerOperationBuilder implements OperationBuilder {
5757
5858 EagerOperationBuilder (EagerSession session , String type , String name ) {
59- if (!session .isOpEnabled (type ))
59+ if (!session .isOpEnabled (type )) {
6060 throw new IllegalArgumentException ("Op " + type + " is not valid in eager mode." );
61+ }
6162
6263 this .session = session ;
6364 this .type = type ;
@@ -78,15 +79,15 @@ public EagerOperation build() {
7879
7980 @ Override
8081 public EagerOperationBuilder addInput (Output <?> input ) {
81- addInput (opHandle , (TFE_TensorHandle )input .getUnsafeNativeHandle ());
82+ addInput (opHandle , (TFE_TensorHandle ) input .getUnsafeNativeHandle ());
8283 return this ;
8384 }
8485
8586 @ Override
8687 public EagerOperationBuilder addInputList (Output <?>[] inputs ) {
8788 TFE_TensorHandle [] inputHandles = new TFE_TensorHandle [inputs .length ];
8889 for (int i = 0 ; i < inputs .length ; ++i ) {
89- inputHandles [i ] = (TFE_TensorHandle )inputs [i ].getUnsafeNativeHandle ();
90+ inputHandles [i ] = (TFE_TensorHandle ) inputs [i ].getUnsafeNativeHandle ();
9091 }
9192 addInputList (opHandle , inputHandles );
9293 return this ;
@@ -229,7 +230,9 @@ public EagerOperationBuilder setAttr(String name, Shape[] values) {
229230 private final String type ;
230231 private final String name ;
231232
232- /** This value should be >= to the maximum number of outputs in any op */
233+ /**
234+ * This value should be >= to the maximum number of outputs in any op
235+ */
233236 private static final int MAX_OUTPUTS_PER_OP = 1000 ;
234237
235238 private static void requireOp (TFE_Op handle ) {
@@ -361,7 +364,7 @@ private static void setAttrFloatList(TFE_Op opHandle, String name, float[] value
361364
362365 private static void setAttrBool (TFE_Op opHandle , String name , boolean value ) {
363366 requireOp (opHandle );
364- TFE_OpSetAttrBool (opHandle , name , (byte )(value ? 1 : 0 ));
367+ TFE_OpSetAttrBool (opHandle , name , (byte ) (value ? 1 : 0 ));
365368 }
366369
367370 private static void setAttrBoolList (TFE_Op opHandle , String name , boolean [] values ) {
@@ -413,7 +416,7 @@ private static void setAttrShapeList(TFE_Op opHandle, String name, long[] shapes
413416 }
414417 TF_Status status = TF_Status .newStatus ();
415418 TFE_OpSetAttrShapeList (opHandle , new BytePointer (name ), shapesPointers , new IntPointer (numDims ),
416- numDims .length , status );
419+ numDims .length , status );
417420 }
418421 }
419422}
0 commit comments