Skip to content
This repository was archived by the owner on Apr 23, 2025. It is now read-only.

Commit 53a70fc

Browse files
committed
Style fixes from #154
1 parent 35c20e8 commit 53a70fc

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Transformer/PythonCheckpointReader.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
import TensorFlow
1616

17-
struct Config : Codable {
17+
struct Config: Codable {
1818
let vocabSize: Int
1919
let contextSize: Int
2020
let embeddingSize: Int

Transformer/main.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ let encoder = Python.import("encoder").get_encoder(modelName)
2323

2424
let checkpoint = "models/\(modelName)/model.ckpt"
2525
let configFile = "models/\(modelName)/hparams.json"
26-
let configData = try Data.init(contentsOf: URL(fileURLWithPath: configFile))
26+
let configData = try Data(contentsOf: URL(fileURLWithPath: configFile))
2727
let config = try JSONDecoder().decode(Config.self, from: configData)
2828
let model = TransformerLM(
2929
contentsOfPythonCheckpointFile: checkpoint, config: config, scope: "model")

0 commit comments

Comments
 (0)