t.ae
t.ae
It seems [`calc_gradient_penalty`](https://github.com/tamarott/SinGAN/blob/0879a1d2b4807e5d2f3b3f0368e6857158c35fd0/SinGAN/functions.py#L127-L147) is based on this: https://github.com/caogang/wgan-gp/blob/ae47a185ed2e938c39cf3eb2f06b32dc1b6a2064/gan_mnist.py#L129-L149 Both use same expression for computing `gradient_penalty`. ```python gradient_penalty = ((gradients.norm(2, dim=1) - 1) ** 2).mean() * LAMBDA ``` But there's difference...
Currently we can't easily know how many parameters `Layer` instance has. It'll be useful for estimating model size. Keras's `Layer` has this feature. https://github.com/keras-team/keras/blob/c10d24959b0ad615a21e671b180a1b2466d77a2b/keras/engine/base_layer.py#L1105-L1123
I found strange use of `Conv2D` in its test. https://github.com/tensorflow/swift-apis/blob/3304db3e728120b55674cca06894b6ea5083b5e8/Tests/TensorFlowTests/LayerTests.swift#L101-L111 The filter has shape `[1, 2, 2, 1]` and input has shape `[2, 2, 2, 2]`. `Conv2D` has strides `(2,...
It seems reduction functions are supporting axes with duplication like `[0, 0]` (`_Raw.*` handle it under the hood). But `_vjp*` don't consider it, so gradient computation can be incorrect or...
I'm trying to use `_Raw.histogramSummary` but find problems of `StringTensor`. ```swift import TensorFlow let tag = StringTensor("tag") print("tag:", tag) print("tag.scalars:", tag.scalars) let values = Tensor(randomNormal: [100]) let summary: StringTensor =...
According to [RFC5322](https://datatracker.ietf.org/doc/html/rfc5322#section-2.1.1): > Each line of characters MUST be no more than 998 characters, and SHOULD be no more than 78 characters, excluding the CRLF. If we have multiple...
Recently I made PR to make `MySQLCapabilities` available (#170). Now we can use `CLIENT_MULTI_STATEMENTS`. However I found `MySQLPacketDecoder` doesn't support results of such queries. The result packet of multi statements...
Currently it seems `Date` is encoded/decoded as GMT+00:00. [encode](https://github.com/vapor/mysql/blob/02edf2b060ea9ac6cc1bd924563052f61ded35b2/Sources/MySQL/Connection/MySQLData.swift#L557)/[decode](https://github.com/vapor/mysql/blob/02edf2b060ea9ac6cc1bd924563052f61ded35b2/Sources/MySQL/Connection/MySQLData.swift#L527) Now I want to store date as local time zone. So I want to make the `TimeZone`s above configurable. There are...
First argument of `convert_from_bytes` is `pdf_file`. https://github.com/Belval/pdf2image/blob/d415156659f76f898ff2d5c9e2884212ee7fac76/pdf2image/pdf2image.py#L277 Its docstring calls it `pdf_bytes`. https://github.com/Belval/pdf2image/blob/d415156659f76f898ff2d5c9e2884212ee7fac76/pdf2image/pdf2image.py#L302 `pdf_bytes` sounds more accurate for me, but renaming can break compatibility.
```swift var logger = Logger(label: "My Logger") logger.logLevel = .trace // to show label let sqldb = app.db as! SQLDatabase let logdb = sqldb.logging(to: logger) try! logdb.raw("select 1;").run().wait() // Expected:...