t.ae
t.ae
`request.body` can be `nil` if the `bodyStorage` is still `stream`. https://github.com/vapor/vapor/blob/6a5a3b5244d39e2614382c77ddf62e63b712ad06/Sources/Vapor/Request/Request%2BBody.swift#L9-L22 You can call [`collect`](https://github.com/vapor/vapor/blob/6a5a3b5244d39e2614382c77ddf62e63b712ad06/Sources/Vapor/Request/Request%2BBody.swift#L38-L50) method in your `Middleware`.
Ah, it slipped my mind that discriminator is seeing multiple patches. Thank you for your explanation. > and we want the discriminator to be 1-lipschitz per patch. I afraid it...
~I think this is the canonical way to compute gradient penalty.~ I found that since discriminator has batch normalization layers, the code below is not correct... ```python # Create interpolates...
There are two serialization methods: https://github.com/vapor/multipart-kit/blob/73706f1883f2ba950d41f18aec7e3a53766d4a6d/Sources/MultipartKit/MultipartSerializer.swift#L10-L14 https://github.com/vapor/multipart-kit/blob/73706f1883f2ba950d41f18aec7e3a53766d4a6d/Sources/MultipartKit/MultipartSerializer.swift#L26-L45 The former method you are using uses `String` internally so it can corrupt input data. You have to use the latter.
There are two options. 1. If you want to totally disable the gradient for `c`: ```swift struct Model: Layer { var a = Tensor(1.0) var b = Tensor(2.0) @noDerivative var...
I'm sorry but I don't have answer. If the target is sub`Layer`, you can update parameter subset like this: https://github.com/t-ae/stylegan-s4tf/blob/5010c3a9e8d4de045bd17e37aa5e8ecc83b9a5c5/Sources/train/main.swift#L27-L28 https://github.com/t-ae/stylegan-s4tf/blob/5010c3a9e8d4de045bd17e37aa5e8ecc83b9a5c5/Sources/train/main.swift#L88-L89 But it doesn't work in your case. I think...
There's no `Layer`s in list. Can you add them @Shashi456? --- Unlike functions, there are multiple choice in `Layer`s where we check. 1. During `init` 2. When parameters are assigned...
On colab, `tag.scalar` causes crash. ``` tag: StringTensor(handle: TensorFlow.TensorHandle(handle: TensorFlow.TFETensorHandle)) Current stack trace: frame #19: 0x00007f2834f48208 $__lldb_expr13`main at :5:27 ```
> If we were able to add the ability to write summaries without the use of StringTensor (or _Raw operations), would that address your core need? Perhaps yes. I already...
It's OK in gan_mnist.py because `real_data` and `fake_data` has shape `[BATCH_SZIE, OUTPUT_DIM]`, and `Discriminator` reshapes input at first. https://github.com/caogang/wgan-gp/blob/ae47a185ed2e938c39cf3eb2f06b32dc1b6a2064/gan_mnist.py#L100 But, in gan_cifar10.py, `Discriminator` requires input tensor to have rank 4....