Search Options

Results per page
Sort
Preferred Languages
Advance

Results 71 - 80 of 1,138 for yield (0.04 sec)

  1. tests/test_router_events.py

    
    def test_app_lifespan_state(state: State) -> None:
        @asynccontextmanager
        async def lifespan(app: FastAPI) -> AsyncGenerator[None, None]:
            state.app_startup = True
            yield
            state.app_shutdown = True
    
        app = FastAPI(lifespan=lifespan)
    
        @app.get("/")
        def main() -> Dict[str, str]:
            return {"message": "Hello World"}
    
        assert state.app_startup is False
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Wed Oct 18 12:36:40 UTC 2023
    - 3.2K bytes
    - Viewed (0)
  2. src/reflect/iter_test.go

    				}
    				m[v.Int()] = true
    				i++
    			}
    			if i != 3 {
    				t.Fatalf("should loop three times")
    			}
    		}},
    		{"func", ValueOf(func(yield func(int) bool) {
    			for i := range 4 {
    				if !yield(i) {
    					return
    				}
    			}
    		}), func(t *testing.T, s iter.Seq[Value]) {
    			i := int64(0)
    			for v := range s {
    				if v.Int() != i {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 10 14:27:54 UTC 2024
    - 6.4K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/transforms/tf_executor_to_functional.cc

                                             island_body.begin(),
                                             std::prev(island_body.end()));
        // Forward island fetches (tf_executor.yield operands) to island op result
        // uses.
        for (auto result :
             llvm::zip(island_op.getOutputs(), island_op.GetYield().getFetches()))
          std::get<0>(result).replaceAllUsesWith(std::get<1>(result));
      }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Aug 11 20:52:36 UTC 2023
    - 3.4K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/quantization/tensorflow/python/integration_test/concurrency_test.py

                  ),
              ]
          )
          def add(self, x, y):
            res = math_ops.add(x, y)
            return {'output': res}
    
        def data_gen():
          for _ in range(255):
            yield {
                'x': ops.convert_to_tensor(
                    np.random.uniform(size=(10)).astype('f4')
                ),
                'y': ops.convert_to_tensor(
                    np.random.uniform(size=(10)).astype('f4')
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Sep 11 00:47:05 UTC 2023
    - 3.6K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/lite/tests/default_quant_params.mlir

        %4 = "tf.LayerNorm"(%a1, %a2, %a3, %a4) {_tfl_quant_trait = "fully_quantizable", device = ""} : (tensor<128x128xf32>, tensor<1xf32>, tensor<1xf32>, tensor<1xi32>) -> tensor<128x128xf32>
       "tfl.yield"(%4) : (tensor<128x128xf32>) -> ()
      }) {_tfl_quant_trait = "fully_quantizable", device = ""} : (tensor<128x128xf32>, tensor<1xf32>, tensor<1xf32>, tensor<1xi32>) -> tensor<128x128xf32>
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 02 09:41:17 UTC 2024
    - 8.8K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/transforms/tf_functional_to_executor.cc

    //   func @my_fn(%argi...) -> (result_t) {
    //     %results:[[n_args]] = tf_executor.graph {
    //        %island_results:[[nargs + 1]] = tf_executor.island {
    //          ... original ops ...
    //          tf_executor.yield %results...
    //        }
    //        tf_executor.fetch %island_results#...
    //      }
    //      return %graph_results#...
    //    }
    
    #define GEN_PASS_DEF_FUNCTIONALTOEXECUTORDIALECTCONVERSIONPASS
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Aug 11 20:52:36 UTC 2023
    - 4.1K bytes
    - Viewed (0)
  7. analysis/analysis-api/src/org/jetbrains/kotlin/analysis/api/signatures/KtVariableLikeSignature.kt

         *
         * Unfortunately, [symbol] for the `action("")` call will be pointing to the `Function1<P1, R>.invoke(p1: P1): R`, because we
         * intentionally unwrap use-site substitution overrides. Because of this, `symbol.name` will yield `"p1"`, and not `"bar"`.
         *
         * To overcome this problem, [name] property is introduced: it allows to get the intended name of the parameter,
         * with respect to `@ParameterName` annotation.
         *
    Registered: Wed Jun 12 09:53:16 UTC 2024
    - Last Modified: Tue Jun 11 15:45:42 UTC 2024
    - 3.8K bytes
    - Viewed (0)
  8. platforms/core-configuration/bean-serialization-services/src/main/kotlin/org/gradle/internal/serialize/beans/services/BeanSchema.kt

    )
    
    
    private
    val Class<*>.relevantFields: Sequence<Field>
        get() = declaredFields.asSequence()
            .filterNot { field ->
                field.isStatic
                    || field.isTransient
                    || Workarounds.isIgnoredBeanField(field)
            }.filter { field ->
                isNotAbstractTaskField(field)
                    || field.name in abstractTaskRelevantFields
            }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Jun 07 23:09:56 UTC 2024
    - 5.7K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/quantization/stablehlo/python/integration_test/stablehlo_quantizer_odml_oss.ipynb

            "tf.saved_model.save(tf_module, saved_model_dir)\n",
            "\n",
            "def calibration_dataset():\n",
            "  rng = np.random.default_rng(seed=1235)\n",
            "  for _ in range(2):\n",
            "    yield {\n",
            "        'lhs_operand': rng.uniform(low=-1.0, high=1.0, size=input_shape).astype(\n",
            "            np.float32\n",
            "        )\n",
            "    }\n",
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Apr 12 03:40:43 UTC 2024
    - 5.4K bytes
    - Viewed (0)
  10. docs/en/docs/tutorial/middleware.md

    * It can do something to that **response** or run any needed code.
    * Then it returns the **response**.
    
    !!! note "Technical Details"
        If you have dependencies with `yield`, the exit code will run *after* the middleware.
    
        If there were any background tasks (documented later), they will run *after* all the middleware.
    
    ## Create a middleware
    
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Thu Jan 11 16:31:18 UTC 2024
    - 2.9K bytes
    - Viewed (0)
Back to top