Skip to content

Commit

Permalink
Add initialized property for parallel wrappers
Browse files Browse the repository at this point in the history
  • Loading branch information
DrA1ex committed Sep 20, 2023
1 parent 1f1e9e8 commit 57eea79
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/app/neural-network/engine/wrapper/parallel-gan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export class ParallelGanWrapper {
public readonly ganChainWrapper: ParallelModelWrapper<IModel>

public get parallelism() {return this.generatorWrapper.parallelism;}
public get initialized() {return this.generatorWrapper.initialized;}

constructor(public readonly gan: GenerativeAdversarialModel, parallelism?: number) {
this.generatorWrapper = new ParallelModelWrapper(gan.generator, parallelism);
Expand Down
1 change: 1 addition & 0 deletions src/app/neural-network/engine/wrapper/parallel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ export class ParallelModelWrapper<T extends IModel> {
private _weights!: LayerWeights[];

public readonly parallelism: number;
public get initialized() {return this._initialized;}

constructor(public readonly model: T, parallelism = 4) {
this.parallelism = Math.max(1, parallelism);
Expand Down

0 comments on commit 57eea79

Please sign in to comment.