summaryrefslogtreecommitdiff
path: root/opendc-experiments/opendc-experiments-tf20
diff options
context:
space:
mode:
Diffstat (limited to 'opendc-experiments/opendc-experiments-tf20')
-rw-r--r--opendc-experiments/opendc-experiments-tf20/src/main/kotlin/org/opendc/experiments/tf20/core/SimTFDevice.kt3
-rw-r--r--opendc-experiments/opendc-experiments-tf20/src/main/kotlin/org/opendc/experiments/tf20/keras/layer/conv/Conv2D.kt2
-rw-r--r--opendc-experiments/opendc-experiments-tf20/src/main/kotlin/org/opendc/experiments/tf20/keras/layer/core/ActivationLayer.kt2
-rw-r--r--opendc-experiments/opendc-experiments-tf20/src/test/kotlin/org/opendc/experiments/tf20/TensorFlowTest.kt28
4 files changed, 28 insertions, 7 deletions
diff --git a/opendc-experiments/opendc-experiments-tf20/src/main/kotlin/org/opendc/experiments/tf20/core/SimTFDevice.kt b/opendc-experiments/opendc-experiments-tf20/src/main/kotlin/org/opendc/experiments/tf20/core/SimTFDevice.kt
index 9b50758b..c71c4520 100644
--- a/opendc-experiments/opendc-experiments-tf20/src/main/kotlin/org/opendc/experiments/tf20/core/SimTFDevice.kt
+++ b/opendc-experiments/opendc-experiments-tf20/src/main/kotlin/org/opendc/experiments/tf20/core/SimTFDevice.kt
@@ -71,7 +71,8 @@ public class SimTFDevice(
* The [SimMachine] representing the device.
*/
private val machine = SimBareMetalMachine(
- FlowEngine(scope.coroutineContext, clock), MachineModel(listOf(pu), listOf(memory)),
+ FlowEngine(scope.coroutineContext, clock),
+ MachineModel(listOf(pu), listOf(memory)),
SimplePowerDriver(powerModel)
)
diff --git a/opendc-experiments/opendc-experiments-tf20/src/main/kotlin/org/opendc/experiments/tf20/keras/layer/conv/Conv2D.kt b/opendc-experiments/opendc-experiments-tf20/src/main/kotlin/org/opendc/experiments/tf20/keras/layer/conv/Conv2D.kt
index bf4725b7..74124bbd 100644
--- a/opendc-experiments/opendc-experiments-tf20/src/main/kotlin/org/opendc/experiments/tf20/keras/layer/conv/Conv2D.kt
+++ b/opendc-experiments/opendc-experiments-tf20/src/main/kotlin/org/opendc/experiments/tf20/keras/layer/conv/Conv2D.kt
@@ -39,7 +39,7 @@ public class Conv2D(
public val strides: LongArray = LongArray(4), // [1, stride_h, stride_w, 1]
public val activation: Activation = Activation.Relu,
public val padding: ConvPadding = ConvPadding.VALID,
- name: String = "",
+ name: String = ""
) : Layer(name) {
private var padHeight: Double = 0.0
diff --git a/opendc-experiments/opendc-experiments-tf20/src/main/kotlin/org/opendc/experiments/tf20/keras/layer/core/ActivationLayer.kt b/opendc-experiments/opendc-experiments-tf20/src/main/kotlin/org/opendc/experiments/tf20/keras/layer/core/ActivationLayer.kt
index fd25cea6..60b0f754 100644
--- a/opendc-experiments/opendc-experiments-tf20/src/main/kotlin/org/opendc/experiments/tf20/keras/layer/core/ActivationLayer.kt
+++ b/opendc-experiments/opendc-experiments-tf20/src/main/kotlin/org/opendc/experiments/tf20/keras/layer/core/ActivationLayer.kt
@@ -31,7 +31,7 @@ import org.opendc.experiments.tf20.keras.shape.TensorShape
*/
public class ActivationLayer(
public val activation: Activation = Activation.Relu,
- name: String = "",
+ name: String = ""
) : Layer(name) {
override fun build(inputShape: TensorShape) {
diff --git a/opendc-experiments/opendc-experiments-tf20/src/test/kotlin/org/opendc/experiments/tf20/TensorFlowTest.kt b/opendc-experiments/opendc-experiments-tf20/src/test/kotlin/org/opendc/experiments/tf20/TensorFlowTest.kt
index f5d35fa4..c4698058 100644
--- a/opendc-experiments/opendc-experiments-tf20/src/test/kotlin/org/opendc/experiments/tf20/TensorFlowTest.kt
+++ b/opendc-experiments/opendc-experiments-tf20/src/test/kotlin/org/opendc/experiments/tf20/TensorFlowTest.kt
@@ -46,7 +46,12 @@ class TensorFlowTest {
val def = MLEnvironmentReader().readEnvironment(envInput).first()
val device = SimTFDevice(
- def.uid, def.meta["gpu"] as Boolean, coroutineContext, clock, def.model.cpus[0], def.model.memory[0],
+ def.uid,
+ def.meta["gpu"] as Boolean,
+ coroutineContext,
+ clock,
+ def.model.cpus[0],
+ def.model.memory[0],
LinearPowerModel(250.0, 60.0)
)
val strategy = OneDeviceStrategy(device)
@@ -76,7 +81,12 @@ class TensorFlowTest {
val def = MLEnvironmentReader().readEnvironment(envInput).first()
val device = SimTFDevice(
- def.uid, def.meta["gpu"] as Boolean, coroutineContext, clock, def.model.cpus[0], def.model.memory[0],
+ def.uid,
+ def.meta["gpu"] as Boolean,
+ coroutineContext,
+ clock,
+ def.model.cpus[0],
+ def.model.memory[0],
LinearPowerModel(250.0, 60.0)
)
val strategy = OneDeviceStrategy(device)
@@ -106,12 +116,22 @@ class TensorFlowTest {
val def = MLEnvironmentReader().readEnvironment(envInput).first()
val deviceA = SimTFDevice(
- def.uid, def.meta["gpu"] as Boolean, coroutineContext, clock, def.model.cpus[0], def.model.memory[0],
+ def.uid,
+ def.meta["gpu"] as Boolean,
+ coroutineContext,
+ clock,
+ def.model.cpus[0],
+ def.model.memory[0],
LinearPowerModel(250.0, 60.0)
)
val deviceB = SimTFDevice(
- UUID.randomUUID(), def.meta["gpu"] as Boolean, coroutineContext, clock, def.model.cpus[0], def.model.memory[0],
+ UUID.randomUUID(),
+ def.meta["gpu"] as Boolean,
+ coroutineContext,
+ clock,
+ def.model.cpus[0],
+ def.model.memory[0],
LinearPowerModel(250.0, 60.0)
)